-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Images in Jetpack Slideshow don't respect width setting. #35822
Comments
For some reason, the Slideshow is also not calculating correctly the images sizes when the browser devtools are opened. This is happening in both WP.com and self-hosted sites. |
Seems that the block applies a height that cannot exceeds the 80% of the window height (#). That explains why I get a different size when the browser devtools are opened, since the window height is lower. Likely the iframe used in WP.com is making the block to get a wrong window height. |
Actually, this is not the cause, since the block applies the right height in the editor. The issue is on the published view. Images are not resized in the frontend when posts are published in WP.com |
Ok, so apparently WP.com is applying a more restrictive max-width in the I believe this is performed by the |
Hm. By the time execution gets to |
The |
Hm, I'm not sure of the best way forward for this. The editor is "fine" because somewhere it's avoiding the |
I'm sure this has been considered, but can the value of Limiting the image size to the content width made sense in the old days when the size of images in a content never is larger than the content, but it doesn't make much sense anymore to me in this Gutenberg era. |
Proposed solution in D32186-code.
@iamtakashi Oh! You know, I never confirmed what happened on self-hosted, I assumed there was proper sizing going on for each of |
Indeed, without Jetpack and its "site accelerator" (Photon), self-hosted requests the full size image 😱 I really do think we should cap the width at something sane; allowing full images, regardless of size, just feels irresponsible for WP.com (imagine users uploading 30MB images; they could choke their site by adding those images to slideshows). @iamtakashi what would the smallest width be that you consider workable? cc/ @gwwar for any opinions. |
Maybe that's a problem on the slideshow block? Blocks have the ability to use any image size when using them, so perhaps we should ensure the slideshow blocks uses the |
For reference, the But renders the image using the The |
That's only referring to the editor instance, not the front-end render, correct? (Although, having the editor work with maximum |
Both. That picked url of the |
How big is the |
I don't think we want to globally increase the content width limit (or even completely remove it), since that feels irresponsible in WP.com as @kwight noted (i.e. posts created with the classic editor will default to the max size allowed, making users to download more MB than needed). Instead, we can maybe try a narrower approach:
|
See D32189-code. |
WIP in Automattic/jetpack#13362 |
Fixed in D32189-code. |
Thank you both for working on this so quickly. I appreciate it. |
On a self-hosted site, the images in Jetpack Slideshow change its size depending on the width setting (e.g. normal, wide, and full) and that's expected.
However, on WP.com, the size of the image stays the same regardless of the size of the setting. And this results undesirable looking.
The text was updated successfully, but these errors were encountered: