Problem with gallery and WP Rocket (wide gallery)

Posted in: Newspaper
Post count: 15

Hi,

We are encountering a compatibility issue between your theme and WP Rocket’s “Add missing image dimensions” feature. When this feature is enabled, WP Rocket adds width and height attributes to images in galleries. However, the dimensions are incorrect, which causes images to stretch improperly and breaks the gallery layout.

The gallery functions as expected when the feature is disabled. However, we require this feature to remain enabled due to performance optimizations it provides for image handling.

We have referred to this article in WP Rocket’s documentation: Add Missing Image Dimensions. It mentions that the feature modifies the image HTML to include dimensions based on available metadata or placeholders, which might conflict with custom gallery implementations.

Could you please investigate this issue or provide guidance on how we can resolve it? For example:

– Could you ensure compatibility in the theme’s gallery implementation to work seamlessly with WP Rocket’s feature?
– Alternatively, is there a way to override the WP Rocket behavior specifically for gallery images in your theme?

https://ibb.co/mbrm1Pg
https://ibb.co/JmYMb2Y
https://ibb.co/Kqyf3XP

Thank you for your support.

Best regards,
David

Post count: 27744

Hello,

Yes, we will try to be more compatible. Until then, please set this code in Theme Panel -> Custom Code -> Custom CSS -> https://pastebin.com/57SxHW51, clear the cache, and check after.

Thank you!

Post count: 15

Hi,

thank you, this works great.

Best regards,

David

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.