SN-Koarashi / ig-helper

In Instagram, downloading is possible for both photos and videos from posts, as well as for stories, reels or profile picture.
GNU General Public License v3.0
33 stars 2 forks source link

"Open in new tab" and "Download" gives different resolutions of same resource #8

Closed gabianastasie closed 5 months ago

gabianastasie commented 5 months ago

Hi,

I enabled "Force Fetch Resource via Media API" because I get a higher resolution for photos many times. Thank you for that; it's extremely useful!

But there's a problem: https://instagram.com/p/CwtCCacI35p

Opening the above Instagram post into a new tab reveals that its resolution is 1080x1313. Furthermore, the URL indicates that this is not the actual resolution, as it reads "dst-jpg_e35_p1080x1080." Many times if the image is at full resolution, you won't see any "p1080x1080" or anything numbers like that in the URL.

However, when I download it, I receive a 1440x1751 pixel image that is saved locally. Notably greater resolution!

Why is the resolution different, given that "Force Fetch Resource via Media API" is enabled? The resource is clearly retrieved differently. This is also confusing, I was expecting the same resolution. 🤔

SN-Koarashi commented 5 months ago

Because the main intention of "Open in new tab" is to preview images, and because the Media API has a rate limit for individual accounts, but this limit is not clear and does not trigger for every account.
Therefore, in order to use limited resources on buttons with real download intentions, "Open in new tab" will not use the Media API by default.

gabianastasie commented 5 months ago

Because the main intention of "Open in new tab" is to preview images, and because the Media API has a rate limit for individual accounts, but this limit is not clear and does not trigger for every account. Therefore, in order to use limited resources on buttons with real download intentions, "Open in new tab" will not use the Media API by default.

Can you please add an option to let us use Media API for "Open in new tab" too? 🤔 I like to live dangerously! 😎

SN-Koarashi commented 5 months ago

Sure, here it come