ehmorris / High-Resolution-Downloader-For-Instagram

A Chrome extension for easily downloading high resolution copies of any Instagram photo, video, or story.
GNU General Public License v3.0
89 stars 8 forks source link

1440px wide images exist, but aren't available in the web srcset #39

Open ehmorris opened 5 years ago

ehmorris commented 5 years ago

From a support ticket on the extension:

Something interesting seems to be going on with Instagram. They seem to be serving higher (bigger than 1080) quality pictures (does not apply to videos or stories) for certain users since at least November 13 (i tried to narrow it down, and this seems to be the date). It only applies to certain people, and i’m not sure if there’s any pattern behind that. I’ve accidentally noticed it when downloading some picture on my phone with gbinsta. Instead of 1080 picture you usually get it downloaded 1440 one. I’ve tried comparing links, and realized that they were different.

This is the example i’m going to use: https://www.instagram.com/p/BsLceofn9NH/

Here’s what opens (or downloads) on desktop.

https://scontent-arn2-1.cdninstagram.com/vp/fc8069c31a8cdc7a8491bffdf052e964/5CC46F43/t51.2885-15/e35/p1080x1080/47586423_695019494231912_1561643538534144217_n.jpg?_nc_ht=scontent-arn2-1.cdninstagram.com

Notice the conspicuous /p1080x1080/. It only shows for the users with higher quality pictures, and it does not show for everyone. i.e. if the user has a bigger picture - this will be in their link on desktop. (And that’s how you can tell if this particular user has bigger images.)

And here’s the link I get on mobile.

https://scontent-arn2-1.cdninstagram.com/vp/ecba015732f3a71fd4fd2bc8aa79803e/5CD30C50/t51.2885-15/e35/47586423_695019494231912_1561643538534144217_n.jpg?_nc_ht=scontent-arn2-1.cdninstagram.com

Different link for the same picture, and considerable quality improvement in resolution.

Now i’ve tried a few different phones, and it seems that the quality of image is dependent on your phone’s screen resolution. i.e. if you’ve got 1080p phone, then 1080px image will be downloaded. But if you have 1440p phone - it will get a 1440px picture. At first I thought it might have something to do with the app I use (gbinsta, which is an instagram mod), but after trying different one (xinsta) I got the exact same result. Resolution dependent higher quality picture.

Out of about 200 people I follow, only 4 or 5 seem to be affected, so it’s not very widespread. I’m not going to speculate what exactly is going on, but needless to say that I would like to see this on desktop, if it is at all possible.

starvedhorror commented 5 years ago

This has now become a major issue, because since yesterday this has been rolled out for seemingly everyone. That includes stories, which are now getting 1440x2650 as peak resolution. This script seems to be working for getting 1440 stories on desktop but obviously is not a great solution since it's a terminal bulk downloader & is also limited to just stories. Right now there is simply no reason to get anything on desktop, unfortunately.

starvedhorror commented 5 years ago

This might be helpful too.

ehmorris commented 5 years ago

I’ll take another look and update the extension.

ehmorris commented 5 years ago

I see, so the ability to get the larger size depends on using the mobile API. Until the higher resolution source is served to desktop via JSON or the img srcset, this extension can't get it.

starvedhorror commented 5 years ago

That is very unfortunate. Is there no way to work around that? In any case instagram hopefully updates the web API to support this, otherwise it just makes everything that uses it obsolete. On a side note, mobile is also served a higher resolution videos.

ehmorris commented 5 years ago

@starvedhorror I can look into it more later, but it isn't possible to work around that without significantly altering the extension. The extension doesn't make any API requests right now, it only surfaces the assets on the page.

starvedhorror commented 5 years ago

I don't really mean to be pushy, but that would be amazing. Right now i'm stuck using my phone, and it's both inconvenient and slow. Obviously it's not something that can be done overnight, but i imagine it should be worth it in the end, since there is not much reason to use the extension otherwise at this point. I've actually got the old Alec Garcia IG story saver installed as a backup, and it appears to be using the mobile API, since it's downloading the full resolution stories. Unfortunately it's discontinued & buggy, so not really something that could be used reliably for long. Plus it's not nearly as comfortable to use.