wp expands images beyond 100%
-
If your gallery has a few img, say 3x 100px wide each, and your page width is 1000px, then WP shows them *full size* as 333px each.
Stretched like a piece of rubbish.
I see the problem is this css
.wp-block-gallery.has-nested-images figure.wp-block-image img { display: block; height: auto; max-width: 100%!important; width: auto;
The last line width: auto
But how do I fix it?
Do I add to my theme
.wp-block-gallery.has-nested-images figure.wp-block-image img width: fit-content;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp expands images beyond 100%’ is closed to new replies.