How to control the scale factor for Firefox screenshots (duplicate)

Firefox Developer Edition 62.0b13 (64-bit) on Mac OS 10.13.6 (17G65)

Is it possible to control the scale factor for screenshots? For example, I want to screenshot some node that has a width of 1080px via right-click menu:

enter image description here

The result image will be twice the size, so 2160px . But I would like to make a screenshot 1:1. Is there a setting for that? I couldnā€™t find it in about:config .

I saw in this answer that it should be possible in Browser Console, but when I try to do so I get ReferenceError: screenshot is not defined .

This question is a duplicate from Firefox Development.

Hello!

When you take screenshots of a node you canā€™t control scale or dpi (I reckon itā€™s giving you 2x the size you see because youā€™re using a high resolution ā€˜retinaā€™ device).

Iā€™m sorry that the instructions that you found in StackOverflow are outdated. Starting in Firefox 62, to access the screenshot feature in the console you need to prepend a semicolon: :screenshot. Then you can use more specific options such as dpr and selector.

For example, you could get a screenshot of an specific element using its id, at 1x resolution (i.e. not retina/high dpi) with:

:screenshot --selector '#element-id' --dpr 1

Let me know if that works!

1 Like

That works just fine, exactly what I wanted, thanks a lot.

Sweet! Thanks for confirming. Enjoy! :slight_smile:

Yes! I added a new section (ā€œAdditional Optionsā€) here:

1 Like