-
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
Tiled gallery block: photonize image URLs #29495
Comments
Are there concerns about privacy or the other reasons sites may disable photon? |
Sites wanting to implement Content security policy headers might not want to add something as generic as If sites implement their own automatic CDN systems, does Photon interfere with that? |
Photon doesn't pick full-width images in Gutenberg: Automattic/jetpack#10984 |
|
They are for the module; they don't technically have to be for the block. Tho we're making it a hard dependency for the block, for now, to make some tech more straightforward. |
By using Photon, some shape calculations might be more straightforward and we could save bytes by serving actual square images for square layout, instead of cropping them out.
That said, we'll need to ensure experience stays smooth by using "stepped" Photonized image sizes.
Imagine if you uploaded an image or resized the gallery by opening Gutenberg sidebar; each image would now be slightly different size and start loading a new Photon image. We need to ensure that we don't load new photon image too often, especially in the editor.
Situations that we should test:
Suppose in the editor view, we should grab the total width of the gallery and use the same size for each image that we Photonize: that way even if images are shuffled around, they always have an image already loaded.
In the view, we can be a little bit more aggressive with image sizes to save bandwidth.
A bit of code for this already in: https://github.com/Automattic/wp-calypso/pull/29465/files#diff-64399d2ba5e2912315cb18d8cc16dafbR140
Related "use large images" (#29544)
The text was updated successfully, but these errors were encountered: