-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Incorrect image size for Docker Hub #9703
Comments
Haven't looked closely at the API response from Docker Hub, but suspect this is just Mebibytes vs. Megabytes |
Yes, it's possible. However, the badge should show the same value as on the Docker Hub. |
Yes it is that. The size of the image is reported in bytes via the DockerHub API. This image is 4210627 bytes 4210627/1024/1024 = 4.015... In general, we use https://github.com/sindresorhus/pretty-bytes#pretty-bytes for formatting, which uses kilobytes. I think if someone wants to add a kibibytes formatter which can be used for size badges where the upstream convention is to report kibibytes, we can take a look at a PR. |
I agree it would be good for us to support this, though I'd prefer that we do so via providing conditional support to give users control. That's because this is an instance where I think we should try to be consistent across our own ecosystem by default and not trying to match what upstream services do |
Are you experiencing an issue with...
shields.io
🐞 Description
The Docker Image Size badge displays an incorrect size of a Docker Image. In the example, the badge shows 4.21MB, but the size of the latest version is only 4.02MB.
🔗 Link to the badge
💡 Possible Solution
No response
The text was updated successfully, but these errors were encountered: