I'm experiencing a weird behavior where both Chromium(version 61.0) and Firefox(version 54.0) seem to zoom in by default while other applications do not. For example, here I have the same png image file open in web browser and feh image viewer:


As seen above, the image in a web browser(inserted into GitHub README.md file) is stretched. However, zoom settings in both Chromium and Firefox are 100%, i.e no zooming in or out. When I inspect this image with web developer tools, then the resolution is correct: 880x150px. I even created a fresh Firefox profile(firefox -p test) and started Firefox with --safe-mode under that profile, but this didn't help.

xrandr output can be seen below:

$ xrandr 
Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 16384 x 16384
DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 610mm x 350mm
   3840x2160      60.0*+
   2560x1440      60.0  
   1920x1080      60.0     59.9  
   1680x1050      60.0  
   1600x900       60.0  
   1440x900       59.9  
   1280x1024      75.0     60.0  
   1280x800       59.8  
   1280x720       60.0  
   1152x864       75.0  
   1024x768       75.0     70.1     60.0  
   800x600        75.0     72.2     60.3     56.2  
   640x480        75.0     72.8     59.9  
DP-1 disconnected (normal left inverted right x axis y axis)
DVI-D-0 disconnected (normal left inverted right x axis y axis)

When I check the same GitHub page with my laptop(Chromium 63.0 and 1920x1080px resolution), then that image is not stretched.

What might cause such behavior?

  • 1
    Have you tried updating your web browsers? – dsstorefile1 Aug 7 '18 at 4:13
  • 1
    @dsstorefile1 Yes, I upgraded Chromium to version 65.0 and Firefox to version 61.0.1, but this didn't help. On the other hand, when I installed the Midori browser, then image was not stretched. – Martin Aug 7 '18 at 9:30

Such behavior is often coded into the browser. I don't know about Chromium, but Firefox provides the variable browser.enable_automatic_image_resizing which can be configured through the about:config page.

  • For me configuring layout.css.devPixelsPerPx to 1 stopped the scaling. For Chromium, one can use --force-device-scale-factor=1 command line option. – Martin Aug 9 '18 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.