I'm uploading an iPhone image - taken by iPhone camera in vertical - with the dimensions of 2448x3264
and because this dimensions are so high (?) when I create a thumb of 600x360
it automatically rotates to horizontal.
What have I tried without any success:
- Change the thumb dimensions
- Use the
fit
function - Use the
resize
function - Use the
crop
function - Use the
upsize
andaspectRatio
methods - Set only the
height
and use null onwidth
- Set only the
width
and use null onheight
The thumb must have a maximum of height of 360
and I'm ok if the width is not 600
.
$imageResize = Image::make($originalFile);
$imageResize->fit(600, 360, function ($constraint)
{
$constraint->upsize();
});
$imageResize->save($thumbPath);
My goal is to have:
- Thumbnails in vertical if the original photo is vertical
- Thumbnails in horizontal if the original photo is horizontal
How can I achieve this?
fit()
function. – Crossarmorientate
method solved, would you like to set up as an answer so I can accept? – Affiant