Opened 4 months ago
Last modified 4 months ago
#65155 assigned defect (bug)
wrong aspect-ratio of pictures in the galerie with Firefox 150
| Reported by: | fotodrachen | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Gallery | Version: | 6.9.4 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Screenshots in the linked discussion on wpde.org