-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
(srcset) sizes attribute #869
Comments
An example: Some theme that defines a content area which can be edited by this new editor. For the browser to pick the right image file already during parsing (which is the point of using srcset sizes attribute) it must know the width of the image on the finally rendered page in advance. It may be a good idea to let the theme report the available content area dimensions with |
Been thinking what's the best way to do this. There are two sides:
There is one problem with full-width images: Gutenberg's width is different from the theme's width. That means we will have to add If we keep Can also look at changing the way we "discover" local images that are processed by that filter, perhaps a |
Just noticed that, when converting an existing post, when it's initially rendered in the "Classic" block the srcset/sizes thing works in the frontend. But, as soon as you convert the single Classic block in Gutenberg blocks (via ellipsis menu > Convert to blocks), it stops working. As a site owner/maintainer, I wouldn't be so happy to see my frontend markup suddenly changing to something that is a pejorative experience for my users. Not sure why this issue is marked as "Priority low", as any change to the actual frontend content should be avoided at all costs. |
What's the status here? And how does this impact theme/plugin developers? In 'old' WP, we would hook into the |
#4898 implemented this. |
It would be great if the sizes attribute can be supported directly
so responsive images with srcset can work correctly.
sizes attribute maps viewport to image size in advance -
the blocks in gutenberg are influenced by parent blocks and influence image dimension themselves.
The text was updated successfully, but these errors were encountered: