[wp-trac] [WordPress Trac] #65155: wrong aspect-ratio of pictures in the galerie with Firefox 150

WordPress Trac noreply at wordpress.org
Thu Apr 30 13:29:45 UTC 2026


#65155: wrong aspect-ratio of pictures in the galerie with Firefox 150
--------------------------+-----------------------------
 Reporter:  fotodrachen   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  assigned
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Gallery       |    Version:  6.9.4
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 WordPress 6.9.4.
 Element "**Galerie**" (in addition "Simple Lightbox" 2.9.5).
 More than one row of pictures on a page.
 Galerie-configuration:
  - NO crop of the pictures.
  - Aspect-Ratio original.

 The first row of pictures in the first galerie on the page is Okay. Each
 picture has its individual aspect-ratio.
 In the following rows the **pictures have a unique size**. They are
 **streched** to 2:1 to fit this size.

 This happens only with the latest Firefox-Browser 150.0.1 on Linux or
 Windows.
 The error NOT occurs in Brave, Edge or Chrome.

 The following change fixed the error for me:

 File "/wp/wp-includes/blocks/gallery/style.css"

 OLD
 {{{
 .wp-block-gallery.has-nested-images figure.wp-block-image img {
   display: block;
   height: auto;
   max-width: 100% !important;
   width: auto;
 }
 }}}

 NEW
 {{{
 .wp-block-gallery.has-nested-images figure.wp-block-image img {
   display: block;
   width: 100%;
   height: auto;
   object-fit: cover;
 }
 }}}

 Minimize to /wp/wp-includes/blocks/gallery/style.min.css

 See also:

 https://wpde.org/thread/203056-verzerrte-bilder-in-der-gallerie-in-
 firefox/
 Some say the css is wrong, others say it's a bug in Firefox.

 https://bugzilla.mozilla.org/show_bug.cgi?id=2034897

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/65155>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list