Create tests for oversize images
Images can be too large for one of two reasons, and we could consider making tests to identify in either case:
Disk size too large
As encountered in #281031 (closed), we can see the image sizes with this command:
du -ah . | grep -v "/$" | grep ".png" | sort -rh
We could take this a step or two further, set a ceiling, and fail a test if an image is too large on disk.
Pixel dimensions too large
As found in this page the following command returns a list of all images that are larger than 3000px on a side:
find . -name '*.png' -exec file {} \; | sed 's/\(.*png\): .* \([0-9]* x [0-9]*\).*/\2 \1/' | awk 'int($1) > 3000 {print}'
We have a soft limit, but we might want to consider a sanity-check limit … we currently have an 10484 x 816 image (doc/development/img/memory_ruby_heap_fragmentation.png
)
Related to #281031 (closed)
Edited by Amy Qualls