• 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;
    • This topic was modified 2 years, 10 months ago by mayy3321.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘wp expands images beyond 100%’ is closed to new replies.