Jump to content

Topic on Manual talk:$wgResponsiveImages

Problem with hardcoded densities

1
Heinrich krebs (talkcontribs)

I have a problem with

MediaWiki 1.37.2
PHP 7.4.30 (fpm-fcgi)

When $wgResponsiveImages is true, pictures are not showing in Firefox 104.0.2 (64-Bit).

The "alt" text is shown. When I click on "copy image link to clipboard" in the context menu, i get my-url followed by 5x. This is not the URL to any image, obviously.

If I check the page source it shows something like this:

<img alt="Human.jpg" src="/images/thumb/0/07/Human.jpg/50px-Human.jpg" decoding="async" width="50" height="48" srcset="/images/thumb/0/07/Human.jpg/75px-Human.jpg 1,5x, /images/thumb/0/07/Human.jpg/100px-Human.jpg 2x" />

The problem being the 1,5x part. The comma is used as separator for decimals in German, but also for the list of elements in "srcset". So, this can't be parsed by Firefox.

I would like to disable the 1,5 ratio and leave 2x intact.

Reply to "Problem with hardcoded densities"