Hi!
I could not find any previous discussion of why exactly 5MB has been chosen as the limit for embedded images in PyPI descriptions, so excuse me if this has already been set in stone.
I want to argue that 10MB is a better image size restriction, as this is already the restriction imposed on legacy PyPI and on GitHub.
Coordinating these restrictions across these platforms allows package maintainers to only confirm successful embedding of images on one site.
Examples:
I could not find any previous discussion of why exactly 5MB has been chosen as the limit for embedded images in PyPI descriptions, so excuse me if this has already been set in stone.
5MB has been chosen because it is the default for https://github.com/atmos/camo, which we use to proxy images for Warehouse.
I want to argue that 10MB is a better image size restriction, as this is already the restriction imposed on legacy PyPI and on GitHub.
As far as I can tell, Github has no limit on image sizes at all.
Legacy PyPI also has no image size limit, because it doesn't use a proxy and links directly to the image instead.
Coordinating these restrictions across these platforms allows package maintainers to only confirm successful embedding of images on one site.
While it might be as simple as changing the default file size for camo, I can't say with certainty that it will be able to handle images >5MB.
We're planning on moving away from using camo to proxy these images in the future, and we'll take into consideration this limitation when building it's replacement.
In the meantime, you might want to try compressing your GIF, either by reducing the resolution or speeding it up, to get it under the 5MB limit.
Thanks for the reply, @di!
I was not aware of the lack of a size restriction on legacy PyPI, my bad.
But it seems that GitHub has such a restriction, and it is set to 10MB.
10MB.content length exceeded when embedding the GIF within the README.rst.The same size restriction does not apply to embedded image files within GitHub issues. The excact restrictions are documented here.
Thanks for digging that up! In that case it seems reasonable to increase the limit to 10MB (as long as camo can handle it), we'll do some investigating and update this issue accordingly.
Great, I'm glad to help!
Seems that GitHub also uses camo, so it should (at least in theory) work.
@JakobGM, thanks for the issue! I defer to Dustin on how and whether to make this change. On our development roadmap, the most urgent task is to ensure Warehouse is at the point where we can redirect pypi.python.org to pypi.org so the site is more sustainable and reliable, and then shut down the legacy site. Since this is more of a nice-to-have improvement, I've moved it to a future milestone.
Thanks and sorry for the wait.
This has been done! The limit is now 10MB. Thanks @JakobGM.
Was the limit lowered again? I can't get a GIF 9MB to work from a remote server!
Was the limit lowered again? I can't get a GIF 9MB to work from a remote server!
Yea it was a -5Mb works
Currently set to 10000000 bytes, I don't think it's changed. Can you provide a link to a release with a broken image?
Here is my repo and you see the animated GIF playing. It has a size of 4-5MB and I have tried for hours to get a "Bigger"(16MB) version of this animation but GitHub refuse to display it above 5MB
Are you talking about a Python project on pypi.org or a repo on GitHub? This issue tracker is for the codebase behind pypi.org, we can't help you with your GitHub repo.
Are you talking about a Python project on pypi.org or a repo on GitHub? This issue tracker is for the codebase behind pypi.org, we can't help you with your GitHub repo.
Good Lord your right LOL
Most helpful comment
This has been done! The limit is now 10MB. Thanks @JakobGM.