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

glide:width not applied to img src #114

Closed
tinusmile opened this issue Mar 30, 2022 · 1 comment
Closed

glide:width not applied to img src #114

tinusmile opened this issue Mar 30, 2022 · 1 comment

Comments

@tinusmile
Copy link

tinusmile commented Mar 30, 2022

glide:width is not applied to the image src, it is included in original size.

{{ responsive:image glide:width="1600" }}

<picture>
<source ... >
<img alt="" src="/assets/image.jpg" width="2560" height="1430" data-statamic-responsive-images>
</picture>

Statamic 3.3.3 Pro
Laravel 8.83.5
PHP 8.1.2
spatie/statamic-responsive-images 2.11.0

Thanks!

@stuartcusackie
Copy link
Contributor

stuartcusackie commented Apr 24, 2022

I'm confused as to what's going on here too and I'm noticing the same behaviour. Everything seems to work fine but I always thought that the img width and height should match the current item in the srcsect to avoid layout shifts.

The full sized image from the OP is ignored anyway I'm pretty sure. The srcset overrides it before it's downloaded.

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