Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.12 is stretching images #134

Closed
stuartcusackie opened this issue May 24, 2022 · 2 comments
Closed

2.12 is stretching images #134

stuartcusackie opened this issue May 24, 2022 · 2 comments

Comments

@stuartcusackie
Copy link
Contributor

stuartcusackie commented May 24, 2022

The fix applied for this issue causes a bit of a layout problem for me.

Let's say I have a small $img with dimensions of 200x100

And we output it like so (it's part of an array of images):
@responsive($img, 'glide:width' => 400])

2.11 output - Uses original dimensions (glide:width is treated as MAX width)
<img src="whatever.jpg" width="200" height="100" ...

2.11 screenshot - images are consistently sized, original heights maintained
image

2.12 output - Stretches the original dimensions (glide:width is treated as MIN width)
<img src="whatever.jpg" width="400" height="200" ...

2.12 screenshot - images are all stretched to same width, heights are affected
image

I know this package isn't really intended for small images but setting up webp images with jpeg fallbacks is a pain and I'd rather let this package handle all of that.

Any chance the code can be updated so that small images are not stretched greater than their original dimensions? I think it would be more consistent with the current documentation which states "Passing glide:width will consider the width as a max width..."

@stuartcusackie stuartcusackie changed the title 2.12 causes a width problem 2.12 is stretching images May 24, 2022
@riasvdv
Copy link
Member

riasvdv commented May 24, 2022

Should be fixed in 2.12.1!

@riasvdv riasvdv closed this as completed May 24, 2022
@stuartcusackie
Copy link
Contributor Author

Fantastic. Thank you sir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants