You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using it inside a CMS, so i cannot control what the input images are. Most of them are bigger than the output size, so Glide and its crop option do exactly what is needed.
But once in a while an image gets uploaded by the users that is actually a bit smaller than the output size. The glide crop feature then proceeds to enlarge the image, therefore transferring more pixels to the customer than were originally there.
I think this step of increasing the resolution should be done by the visitors browser instead (we specified the image resolution in the CSS as well, so the browser will do it). By not unnecessarily increasing the resolution we would also save bandwidth.
So what I wish is that crop in this case crops the image to the target aspect ratio, and not unnecessarily increases the resolution, and deliver that image.
Or if you wish to keep the crop behaviour the same, I wish that there is a new fit option, probably called crop-max.
Many thanks,
Patrik
The text was updated successfully, but these errors were encountered:
Facing the same problem. We also require that when we need a bigger image, void space should be filled with white.
So if i say crop to 400x400 the resulting image will be exactly 400x400, without upscaling, cropping unneeded parts and adding white background if needed.
Here's my cheapish solution, supporting crop-top-left and similar crops too. crop-x-y is not supported.
Instead of using the default League\Glide\Manipulators\Size manipulator, i'm using this:
Love the project!
I'm using it inside a CMS, so i cannot control what the input images are. Most of them are bigger than the output size, so Glide and its crop option do exactly what is needed.
But once in a while an image gets uploaded by the users that is actually a bit smaller than the output size. The glide crop feature then proceeds to enlarge the image, therefore transferring more pixels to the customer than were originally there.
I think this step of increasing the resolution should be done by the visitors browser instead (we specified the image resolution in the CSS as well, so the browser will do it). By not unnecessarily increasing the resolution we would also save bandwidth.
So what I wish is that crop in this case crops the image to the target aspect ratio, and not unnecessarily increases the resolution, and deliver that image.
Or if you wish to keep the crop behaviour the same, I wish that there is a new fit option, probably called crop-max.
Many thanks,
Patrik
The text was updated successfully, but these errors were encountered: