I will use this image as an example: https://twitter.com/DreamWeaverPony/status/1218553001880801281
When opening this image in a new tab without enlarging the image first the direct url will be this:
Notice the
format=
and name=
fields at the end of the url, they are important.If you instead first clicked on the image to enlarge it and only then opened it via RMB -> open in a new tab you will get a bit different url:
The
name
parameter changed from small
to 4096x4096
. If high resolution png is available then this will have “format=png” in the url, like it is the case on this post: https://twitter.com/bongwater777/status/1287573323052994564You can check that if first enlarged and then opened in a new tab the
format=png
part is already in the url from the start.I know of those available values for
name=
(but there might be more): small
medium
large
900x900
4096x4096
orig
Both
4096x4096
and orig
will give the best possible resolution even when image is less than 4096px, this value seems to be Twitter upper resolution limit.If you manually change the
format=
value from jpg
to png
even though you didn’t get a link with png
from the start then although you will sometimes get a working image, that might not be a file of better quality!. Resulting file might be (or maybe even always is?) a PNG that has quality identical to JPG (with compression artifacts) but just have a higher file size. Do not upload such faux PNG files because they are not better than JPG versions then. Above is a such an image at 600% zoom. Part of url from first example was manually changed from containing_
format=__jpg__&name=4096x4096
(link) to format=__png__&name=4096x4096
(link), _the file size got over 4 times bigger, the format of downloaded file is PNG but image quality is identical to JPG, there are compression artifacts everywhere. There is no point in using images like that.Note that changing
format=
to png
will not work when name=orig
but will work when name=4096x4096
.