Closed Bug 1768244 Opened 3 years ago Closed 3 years ago

Firefox arbitrarily resizes images even when using html web standards.

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

Firefox 91
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: ventolinmono, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Firefox for Android

Steps to reproduce:

Wrote HTML image tag standard correctly:
<img src="200px.jpg" width="200" height="200" />

Actual results:

Firefox enlarges image to 290 px making it blurry and looking awful.

Expected results:

Firefox should render images at their original size as the html code intends to make it do.

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Images, Video, and HTML Frames' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout: Images, Video, and HTML Frames
Product: Firefox → Core

Do you have a test-case that reproduces the issue please? There's no way to reproduce from your html example, and a simplified test-case based on that works fine.

Flags: needinfo?(ventolinmono)

Here's the full HTML:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<!-- <img src="200px.jpg" width="200" height="200" /> -->
<img src="200px.jpg" style="width: 200px; height: 200px" />
</body>
</html>

Here's the result: https://imgur.com/xMcL00x

Flags: needinfo?(ventolinmono)

Is your system dpi setting affecting this? You can check by right clicking on the page, inspect, then console, then type window.devicePixelRatio and press enter.

Oh, you're talking about Firefox for Android? On mobile all browsers will choose an initial zoom, and that will often be different from assigning 1 CSS pixel = 1 screen pixel. (Css pixel being what widths and heights in css are specified in) With your testcase I get the same behaviour on Android with Chrome and Firefox for example.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.