Skip to content
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 Galleries: automatically transform gallery shortcode with type parameter into Tiled Gallery block #12903

Open
ghost opened this issue Jun 28, 2019 · 13 comments
Labels
[Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Pri] Normal [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Comments

@ghost
Copy link

ghost commented Jun 28, 2019

Updated issue description based on discussion below

Steps to reproduce

  1. Add a new post
  2. In that post, add a new classic block.
  3. In that classic block, add a gallery, and pick a tiled gallery type for that gallery.
  4. Publish your post.
  5. Come back to it in the editor, and choose the option to "convert to blocks".
  6. You would expect the gallery to be transformed into a Gallery block when this one is available, but that does not seem to work; the gallery is transformed into a standard Gallery block.

Original description below


Tiled Gallery does not work when using the block editor unless Photon is enabled.

However, this is not a requirement when using the classic editor. Working functions should be left as they are especially since they cause no adverse effect on the other changes in Jetpack .

Working functions should be left as they are especially since they cause no adverse effect on the other changes in Jetpack.

I would very much like to be able to use the tiled gallery feature when using the block editor as it does in the classic editor. Choosing a CDN should not be a forced option on the user because they want to continue using a feature that has been working without Photon, the CDN being turned on. This is particularly problematic for those of us using other CDNs. Using the Jetpack CDN is indeed quite cumbersome as deleting images or replacing them require special steps.

Continue offering tiled galleries without forcing the CDN being turned on. This will also cause a massive problem when the time comes to discontinue supporting the classic editor. Since the technology exists to make the tiled gallery to work without turning on the global Jetpack CDN it makes eminent sense to do the same for the block editor. Not doing so will result in potentially serious problems when the classic editor is discontinued if a post with a tiled gallery needs to be edited. The result will be a broken post, guaranteed, or forced use of the Jetpack CDN whether the user wants it or not.

Users who need a CDN may choose the Jetpack Photon but may also choose another one. This choice should not break their sites.

@jeherve jeherve added [Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Jul 3, 2019
@jeherve
Copy link
Member

jeherve commented Jul 3, 2019

I am afraid that's not an option right now. Jetpack's Tiled Galleries rely on our image CDN, regardless of the version of Jetpack you use or the editor you use to create those galleries.

Whether you use the Classic Editor or the Block editor, Jetpack's Tiled Galleries rely on Jetpack's Image CDN to resize images on the fly and create the tiled effect.

If you were to use tiled galleries without that CDN, you would have to load full-size images for each image in your gallery, and then resize those images with CSS. This could potentially be bad for your site's performance since those full-size images may be quite big, and it may also have an impact on your images's look since resizing via CSS is done by the browser and may vary from browser to browser.

Since the technology exists to make the tiled gallery to work without turning on the global Jetpack CDN

Could you give me more details about this? How do you currently use Jetpack's Tiled Galleries without Jetpack's Image CDN? Could you maybe post a link to a post using such a gallery?

Thank you!

@ghost
Copy link
Author

ghost commented Jul 9, 2019

Take a look at the following post:

https://www.keptlight.com/let-the-garden-talk/

You will recognize the tiled gallery presentation. On this site, I do not have Photon turned on globally. Several years ago, I was told that tiled galleries will use Photon whether it is activated on a site-wide basis or not. And the practice proved that. Tiled gallery images are served from your CDN and the rest of my images are served from my site and CloudFlare. All I am asking for is the same treatment of tiled galleries when I use the block editor. But, if I edit this or other similar posts in block editor the tiled gallery is broken even if I do not touch it. This is why I think it will be a major problem if and when the classic editor is discontinued. Any edit of these posts in the block editor will break the tiled galleries that may be inserted even if the edit is for fixing a typo.

I am not sure why I am having so much difficulty explaining myself, maybe my age is catching up with me. In summary:

  • When using the classic editor it is possible to insert and use tiled galleries without activating Photon site-wide
  • When such a post is edited in the block editor without activating Photon on a site-wide basis the tiled gallery breaks
  • Since it currently works without activating Photon, I and many other users may be inserting tiled galleries into our posts
  • These tiled galleries will break if we switch to the block editor even to edit an old post in it if Photon is not activated
  • Leaving the current behavior of tiled galleries of using Photon only for their images will be ideal for the block editor as well

Thank you,

@simison simison added [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it labels Jul 9, 2019
@simison
Copy link
Member

simison commented Jul 9, 2019

I'd love to see this happen as well and I think there might be ways to implement it, but it needs some investigation.

@simison simison added [Pri] Normal and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Jul 9, 2019
@jeherve jeherve added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Jul 12, 2019
@jeherve
Copy link
Member

jeherve commented Jul 12, 2019

When using the classic editor it is possible to insert and use tiled galleries without activating Photon site-wide
When such a post is edited in the block editor without activating Photon on a site-wide basis the tiled gallery breaks

Could you tell me more about this? When you edit such a post, do you convert the classic block that includes the gallery into a Tiled Gallery block? What kinds of edits do you make on that post?

@ghost
Copy link
Author

ghost commented Jul 12, 2019

Yes, I convert the post to blocks and the Tiled Gallery becomes a regular gallery. It does not matter what kind of edits I make, the Tiled Gallery is gone as soon as the post is converted to blocks.

@jeherve
Copy link
Member

jeherve commented Jul 17, 2019

Thank you! This seems to be the real issue here: you would expect the block editor to transform your old Tiled Gallery into a Tiled Gallery block, but it fails to do that. That is not an issue with Photon.

This issue is also tracked here:
WordPress/gutenberg#15134

Sounds to me like Jetpack needs to provide a custom block transform to make this work. Gutenberg itself cannot know what Jetpack does with the gallery, so it's the plugin's the responsibility to provide that info IMHO.

@jeherve jeherve removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Jul 17, 2019
@jeherve jeherve changed the title Allow using Tiled Gallery without needing Photon being turned on Tiled Galleries: automatically transform gallery shortcode with type parameter into Tiled Gallery block Jul 17, 2019
@jeherve
Copy link
Member

jeherve commented Jul 17, 2019

Related: #11779

@ghost
Copy link
Author

ghost commented Jul 17, 2019

Thanks for the updates and identifying the real problem I tried to explain from the user end. Looking forward to a fix. I have also read the other threads, thank you.

@jeherve
Copy link
Member

jeherve commented Jul 17, 2019

Thank you for reporting this!

@tmksr
Copy link

tmksr commented Jul 18, 2019

For me the problem is, that i have about 1000 posts where i mostly used tiled galleries since they are available. I never activated photon (it never worked for me without trouble). Right now i deactivated the Jetpack plugin, and after activating it again i am forced to use Photon for my entire site or any of my tiled galleries brake. They appear as medium sized images below each other! I don't want to use photon, but doing not so will brake my site - just add the function again of using tiled galleries without photon. it worked well for years! The most annoying part of the story is: when using photon my images will be delivered in less sharp version (5K Retina Display) to the jetpack carousel as the original file. and are you serious about this "currently the images are cached forever" … ?!

@jeherve
Copy link
Member

jeherve commented Jul 19, 2019

just add the function again of using tiled galleries without photon. it worked well for years!

To clarify, Tiled Galleries have always used Photon, whether the Photon feature was on or off. In all the posts where you inserted Tiled Galleries, the gallery images have always been served by Photon. If you did not notice it before, it means that Photon was working well for all gallery images on your site.

This was confusing for a lot of people (indeed, one would not expect to see Photon in use on the site when they deactivated the Photon feature), so back in 2016 we updated the main Jetpack dashboard page to keep only one toggle, that would turn on both Photon and Tiled Galleries at the same time.

Since you would prefer to have only your gallery images use Photon on your site, and other images would be served locally, I would recommend that you go to this page in your dashboard, and enable Tiled Galleries while leaving the Image CDN feature off:
https://yoursite.com/wp-admin/admin.php?page=jetpack_modules

The most annoying part of the story is: when using photon my images will be delivered in less sharp version (5K Retina Display) to the jetpack carousel as the original file.

Unless you've manually disabled Jetpack's devicepx feature with a code snippet (that feature is enabled by default when you activate Jetpack on your site), Jetpack should automatically serve larger images on Retina / HIDPi devices, so this should not happen. If it does, could you contact our support team with some examples of pages where we can see the issue?

Thank you!

are you serious about this "currently the images are cached forever"

Yes. If you'd like to update an image in one of your posts, I would recommend uploading a new image to your Media Library.

@HammyHavoc
Copy link

HammyHavoc commented Apr 2, 2024

Absurd that this lock-in is a thing. Huge website with a lot of use of Jetpack's tiled image gallery, but disabling the CDN thus breaks it. I don't see why the image gallery rewrites URLs to https://i0.wp.com/www.mydomain.com/wp-content, surely the logical thing would be a toggle to just allow the image to be local? We already generate images at various sizes for thumbnails of "Featured Images" of posts.

This just strikes me as a way to strong-arm users into sticking with Jetpack, and potentially subscribing. Already have a CDN, we don't need a second one, and any potential service we might like, such as VaultPress, this puts me right off.

@jeherve
Copy link
Member

jeherve commented Apr 3, 2024

@HammyHavoc I see you've also created #36707. I'll reply to your questions there, since they are not related to this specific issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Pri] Normal [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

No branches or pull requests

4 participants