Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade images by local copies #46

pavelkryukov opened this issue Sep 5, 2017 · 2 comments


Copy link

commented Sep 5, 2017


Instagram compresses images on upload in terms of size and JPEG. I use the service since 2011, and compression rate for my early pictures is too high, some downloaded images have low quality. Since I have a local archive of all saved photos from my iPhones, I wrote a script to find better versions of fetched images here. The script is available here:

I followed this example: They use imagehash to detect similar images and shelve to store a database (so we do not have to iterate everything twice). Sometimes hashes between the original and the uploaded version are sligtly different, so we have to iterate through the whole database to find the best match :-(.

I would like to know if you see an opportunity to merge this functionality into InstaLoader. There is no problem to save a hash for each image to a .txt file during download, but looking over the database might have several options (how to generate a database and where to keep it for the next update? what if files were moved to other location?)


@aandergr aandergr self-assigned this Sep 22, 2017

This comment has been minimized.

Copy link

commented Jan 7, 2018


Imagehashing seems an interesting tool for managing databases of images where encountering duplicates or near-duplicates can be used e.g. for then pointing to the representative with the best quality for each "equivalence class" of pictures. This approach and your script seem great, and I can imagine that many people may want to "upgrade" their galleries like that such that they are compiled by multiple sources of images. Thanks for sharing it with us!

However, I don't see how we could cleanly integrate such a feature into Instaloader. Maybe it would be best to keep it as a separate tool, or toolset for picture gallery managment. Nevertheless, I am planning to create a well-structured place, most probably a section in our documentation, where we could refer to all the (known) external scripts that are somehow affiliated with Instaloader, by extending it, using it for other purposes than just downloading, or post-processing the data generated by it. There, we could definitely include your script, if you'd agree with that.

Best Regards


This comment has been minimized.

Copy link

commented Jan 9, 2018

Sounds good. Thanks!


aandergr added a commit that referenced this issue Jun 4, 2018
Presents code examples that use the instaloader module for more advanced tasks
than what is possible with the Instaloader command line interface.

Presents #46, #56, #110, #113, #120, #121.
@aandergr aandergr closed this Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.