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

height parameter missing in srcset #41

Open
moritz-helten opened this issue Jun 23, 2022 · 1 comment · May be fixed by #48
Open

height parameter missing in srcset #41

moritz-helten opened this issue Jun 23, 2022 · 1 comment · May be fixed by #48

Comments

@moritz-helten
Copy link

If an image should be cropped, the output is correct on the src attribute, see: w:3572,h:714 in the example below.
In the srcset the urls do not have a height, see w:893 in the example below.

<img 
alt="" 
title="" srcset="https://media.graphcms.com/resize=w:893,fit:crop/output=quality:95,strip:true/sharpen=amount:1/auto_image/compress/Q5aVZCmpSB29FhCL9O2R 893w,https://media.graphcms.com/resize=w:1786,fit:crop/output=quality:95,strip:true/sharpen=amount:1/auto_image/compress/Q5aVZCmpSB29FhCL9O2R 1786w,
https://media.graphcms.com/resize=w:3572,fit:crop/output=quality:95,strip:true/sharpen=amount:1/auto_image/compress/Q5aVZCmpSB29FhCL9O2R 3572w"
src="https://media.graphcms.com/resize=w:3572,h:714,fit:crop/output=quality:95,strip:true/sharpen=amount:1/auto_image/compress/Q5aVZCmpSB29FhCL9O2R" 
sizes="(max-width: 3572px) 100vw, 3572px" style="position: absolute; top: 0px; left: 0px; transition-duration: 0.5s; transition-timing-function: ease; transition-property: opacity; opacity: 1; width: 100%; height: 100%; object-fit: cover; object-position: center center;">

The goal is to have consistent aspect ratios in the src and srcset images.

@moritz-helten
Copy link
Author

Do you have any news on this issue?

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

Successfully merging a pull request may close this issue.

1 participant