-
Notifications
You must be signed in to change notification settings - Fork 812
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
Photon Image CDN doesn't work well with blocks #35005
Comments
I think WooCommerce product image, and post featured image also don't work well with Jetpcak when in a loop. |
I cannot seem to be able to reproduce the issue on my end. The Does this happen with specific image blocks on your end, or with all of them? |
Thanks @jeherve I'm pretty sure Gutenberg doesn't add HTML I've verified it many times. Also, it is an open Gutenberg Github issue: WordPress/gutenberg#23244 Gutenberg only sets Maybe what you see is something Jetpack is doing retroactively - copying CSS properties into HTML attributes, with JavaScript: But this happens too late, and doesn't affect the transform params on the Jetpack URL: This is the original HTML from the browser's page source. You can see the original The 800 width is set as a fallback, as I use the (BTW, I'm not sure I understand the purpose of changing the HTML attributes so late. It seems to be more confusing than helpful. It is probably too late to help with the Cumulative Layout Shift). Let me know if I missed something. And to answer your question, it happens to me with all image blocks. Actually, all image-related blocks as well, such as galleries and covers with images. |
Thanks @jeherve Just the better understand the case, about your first screenshot, is it possible you are using one of the built-in resolutions, rather than a custom |
Yup, I was using one of the built-in resolutions. If you use a custom width and height, resizing happens via CSS. |
Yes, so Gutenberg never passes custom |
Impacted plugin
Jetpack
Quick summary
In some (or most) cases, image sizes aren't being passed by Gutenberg in a way that can be utilized by Jetpack image CDN.
Steps to reproduce
I couldn't find a similar ticket. I hope it isn't a duplicate.
I believe there are a few issues with Jetpack and Gutenberg:
width
andheight
attributes to be utilized by Jetpack (just an inlinestyle
attribute).width
andheight
attributes are being ignored by Jetpack. This makes things even more complicated and confusing.Notes:
add_filter('jetpack_photon_noresize_mode', '__return_true');
which might make things a bit more complicated.post-thumbnail
size used by the block isn't actually registered).width
andheight
attributes but could not convince them it is important (I believe it is a good practice, regardless of Jetpack).I assume most of the adjustments will need to be made on the Gutenberg side. But as I tried and failed to motivate them, I thought you might have a better chance.
A clear and concise description of what you expected to happen.
No response
What actually happened
No response
Impact
Most (> 50%)
Available workarounds?
No but the platform is still usable
Platform (Simple and/or Atomic)
No response
Logs or notes
No response
The text was updated successfully, but these errors were encountered: