-
Notifications
You must be signed in to change notification settings - Fork 4.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
Gallery images are not responsive #5674
Comments
It's important to note that, since the introduction of galleries, the default inserted image size for galleries has been "thumbnail" (with the option to change it in the dropdown menu). Also, a gallery shortcode with no "size" parameter has always resulted in the thumbnail being embedded on the frontend. Currently, in Gutenberg, galleries are embedding the "full" image. This means that Gutenberg-galleries are pretty much unusable with high-resolution imagery. They will result in hugely bloated pages. In a test run I did with my design students, they created 100+ Mb pages with 10 - 20 images coming straight from their cameras. |
For the moment until the thumbnail size options built-in I have reverted back the gutenberg gallery code to the long-time tested [gallery] shortcode: |
Based on my testing of Gutenberg 3.3, Galleries are still outputting the full size images. This causes a significant performance hit when the plugin is installed. |
Adding |
Granted, we can do better but There's already #1450 for picking sizes for gallery images. Let's avoid duplicates. There's also the issue you point to. The current issue was specificly about the srcset attribute IMO. |
Interestingly I've uncovered a severe bug in current WP around how the |
Issue Overview
There is no srcset attribute for images added via Gutenberg's gallery feature, unlike the images function.
Steps to Reproduce (for bugs)
Expected Behavior
The SRCSET attribute should be enforced on gallery images allowing the thumbnails to appear.
Current Behavior
The full size image is shown for gallery images, wasting precious data transfer.
Possible Solution
Implement the srcset attribute similar to normal images.
Screenshots / Video
Related Issues and/or PRs
Todos
The text was updated successfully, but these errors were encountered: