Make WordPress Core

Opened 6 weeks ago

Last modified 6 weeks ago

#65155 assigned defect (bug)

wrong aspect-ratio of pictures in the galerie with Firefox 150

Reported by: fotodrachen's profile fotodrachen Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.9.4
Component: Gallery Keywords:
Focuses: Cc:

Description

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

Change History (1)

#1 @fotodrachen
6 weeks ago

Screenshots in the linked discussion on wpde.org

Note: See TracTickets for help on using tickets.