-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add width and height attributes for images added from URL #49
Comments
Seems like this would be straightforward to add in Gutenberg when a remote image is added. Once the image is loaded, the width/height can then be persisted as attributes. Nevertheless, what if the author is linking to an image without consistent width/height? For example, they could be linking to https://source.unsplash.com/random so that a random image with random dimensions are used. If the dimensions were obtained and stored, then this would break. One may say this authors shouldn't be doing this, but alas, it's something users may indeed do (and have a need to do so). |
This is not totally fixed, but I don't think we have any follow-up to do that needs tracking here. WordPress adds h/w values to images via Closing for now as no additional work is planned. |
Also closely related to #10 |
When images are inserted from a URL in the block editor, the resulting HTML should include the image width and height in order to avoid layout shift. Currently it does not.
See WordPress/gutenberg#6652
Fix might need to be in Gutenberg, adding this ticket here since it can impact image performance.
The text was updated successfully, but these errors were encountered: