# commands.log: etsy-listing-photo-size, November 30, 2026 (server: Ubuntu 24.04, ffmpeg version 6.1.1-3ubuntu5, Python 3.12.3, Node v24.21.0, Playwright Chromium) # Each published command as run, its exit code and the edge inputs it was also tried on. Scripts sit next to this file. The tool runs used a local copy of koldflux.com (BASE). published: python3 etsy-photo-check.py my-etsy-photos # the folder my-etsy-photos holds the four 950 KB outputs ran: python3 ../pub/etsy-photo-check.py my-etsy-photos exit=0 | file | bytes | stored | orientation | upright | short_side_2000 | under_1000000_bytes | my-etsy-photos/candle-wax-950kb.jpg | 877573 | 4000x2992 | none | 4000x2992 | yes | yes | my-etsy-photos/decorative-candle-950kb.jpg | 917432 | 3072x4608 | none | 3072x4608 | yes | yes | my-etsy-photos/duck-mug-950kb.jpg | 968913 | 3668x4139 | none | 3668x4139 | yes | yes | my-etsy-photos/toy-train-950kb.jpg | 899048 | 3872x2592 | none | 3872x2592 | yes | yes edge: original phone photo stored sideways (EXIF orientation 8) and over 1,000,000 bytes ran: python3 ../pub/etsy-photo-check.py decorative-candle.jpg exit=1 | file | bytes | stored | orientation | upright | short_side_2000 | under_1000000_bytes | decorative-candle.jpg | 6028651 | 4608x3072 | 8 | 3072x4608 | yes | no edge: missing file, empty file, a transparent PNG ran: python3 ../pub/etsy-photo-check.py missing.jpg empty.jpg cutout-transparent.png exit=1 | file | bytes | stored | orientation | upright | short_side_2000 | under_1000000_bytes | missing.jpg | missing | empty.jpg | 0 | empty file | cutout-transparent.png | 36296 | not a JPEG (no SOF0/1/2 frame) edge: @list with Windows line breaks and a non-ASCII file name ran: python3 ../pub/etsy-photo-check.py @list-crlf.txt exit=1 | file | bytes | stored | orientation | upright | short_side_2000 | under_1000000_bytes | toy-train-950kb.jpg | 899048 | 3872x2592 | none | 3872x2592 | yes | yes | train • été.jpg | 1774853 | 3872x2592 | none | 3872x2592 | yes | no edge: a missing @list file ran: python3 ../pub/etsy-photo-check.py @nolist.txt toy-train-950kb.jpg exit=1 | file | bytes | stored | orientation | upright | short_side_2000 | under_1000000_bytes | nolist.txt | missing list | toy-train-950kb.jpg | 899048 | 3872x2592 | none | 3872x2592 | yes | yes edge: camera-style names IMG_0001.JPG and b.jpeg: the folder finds both, the pattern *.jpg finds neither (in bash the unmatched pattern reaches the script; zsh stops before Python with 'no matches found') ran: python3 ../pub/etsy-photo-check.py case exit=0 | file | bytes | stored | orientation | upright | short_side_2000 | under_1000000_bytes | case/IMG_0001.JPG | 899048 | 3872x2592 | none | 3872x2592 | yes | yes | case/b.jpeg | 968913 | 3668x4139 | none | 3668x4139 | yes | yes ran: bash -c cd case && python3 ../../pub/etsy-photo-check.py *.jpg exit=1 | file | bytes | stored | orientation | upright | short_side_2000 | under_1000000_bytes | *.jpg | missing (no file matches this pattern; patterns are case-sensitive; give the folder instead) edge: an empty folder ran: python3 ../pub/etsy-photo-check.py emptydir exit=1 | file | bytes | stored | orientation | upright | short_side_2000 | under_1000000_bytes | emptydir | no .jpg or .jpeg files edge: no arguments ran: python3 ../pub/etsy-photo-check.py exit=2 | etsy-photo-check.py: before you upload, print each JPEG's bytes, stored pixel size, EXIF | orientation ("none" when the file has no orientation tag), upright size and two yes/no checks against the Etsy Help Center figures read on | 2026-11-30: shortest side at least 2000 px (Etsy: 2000 or more recommended, 635 for the first | photo at the very least), and under 1,000,000 bytes (Etsy says images | larger than 1MB may not finish uploading; 1,000,000 bytes is the stricter reading of 1MB). | Standard library only. Exit code 0 when every file passes both checks, 1 otherwise. | Usage: | python3 etsy-photo-check.py photo1.jpg photo2.jpg ... | python3 etsy-photo-check.py . (a folder: every .jpg and .jpeg in it, any letter case) | python3 etsy-photo-check.py @list.txt (one path per line; Windows line breaks are fine) | A shell pattern such as *.jpg is case-sensitive and skips IMG_0001.JPG and photo.jpeg; in zsh | (the macOS default) a pattern that matches nothing stops the command. Give the folder instead. published: node tool-run.cjs 972800 out 1 photo.jpg ran: node ../pub/tool-run.cjs 972800 out 1 toy-train-950kb.jpg exit=0 | {"file":"toy-train-950kb.jpg","target":972800,"shrink":"1","ms":1967,"saved":"out/toy-train-950kb-950kb.jpg","bytes":899396,"ui":"TARGET USED | 950.00 KB | ACTUAL RESULT | 878.32 KB | DIFFERENCE | 71.68 KB under | JPEG QUALITY USED | 84% | PICTURE SIZE | 3872 × 2592 (unchanged) | ORIGINAL | 877.98 KB | ENCODE ATTEMPTS | 5"} edge: non-ASCII file name, missing file, empty file ran: node ../pub/tool-run.cjs 972800 out 1 train • été.jpg missing.jpg empty.jpg exit=0 | {"file":"train • été.jpg","target":972800,"shrink":"1","ms":1956,"saved":"out/train • été-950kb.jpg","bytes":899048,"ui":"TARGET USED | 950.00 KB | ACTUAL RESULT | 877.98 KB | DIFFERENCE | 72.02 KB under | JPEG QUALITY USED | 84% | PICTURE SIZE | 3872 × 2592 (unchanged) | ORIGINAL | 1.69 MB | ENCODE ATTEMPTS | 5"} | {"file":"missing.jpg","skipped":"missing or empty"} | {"file":"empty.jpg","skipped":"missing or empty"} edge: transparent PNG ran: node ../pub/tool-run.cjs 972800 out 1 cutout-transparent.png exit=0 | {"file":"cutout-transparent.png","target":972800,"shrink":"1","ms":1107,"saved":"out/cutout-transparent-950kb.jpg","bytes":43197,"ui":"TARGET USED | 950.00 KB | ACTUAL RESULT | 42.18 KB | DIFFERENCE | 907.82 KB under | JPEG QUALITY USED | 95% | PICTURE SIZE | 2400 × 2400 (unchanged) | ORIGINAL | 35.45 KB | ENCODE ATTEMPTS | 3"} edge: a 48 MP photo, 8064 x 6048 (ffmpeg testsrc2): the tool refuses images over 40 megapixels ran: node ../pub/tool-run.cjs 972800 out 1 big-48mp.jpg exit=0 | {"file":"big-48mp.jpg","target":972800,"refused":"Choose an image with valid dimensions up to 40 megapixels."} published: node crop-run.cjs 3872 2592 1:1 4:5 4:3 ran: node ../pub/crop-run.cjs 3872 2592 1:1 4:5 4:3 exit=0 | {"W":3872,"H":2592,"ratio":"1:1","box":"2592 × 2592","kept":"66.9%","cut":"640 px left and right"} | {"W":3872,"H":2592,"ratio":"4:5","box":"2074 × 2592","kept":"53.6%","cut":"899 px left and right"} | {"W":3872,"H":2592,"ratio":"4:3","box":"3456 × 2592","kept":"89.3%","cut":"208 px left and right"} edge: control with a known answer, 1920 x 1080 at 9:16 ran: node ../pub/crop-run.cjs 1920 1080 9:16 exit=0 | {"W":1920,"H":1080,"ratio":"9:16","box":"608 × 1080","kept":"31.6%","cut":"656 px left and right"} edge: mirrored ratio on the portrait photo (5:4 is the mirror of 4:5) ran: node ../pub/crop-run.cjs 3072 4608 5:4 exit=0 | {"W":3072,"H":4608,"ratio":"5:4","box":"3072 × 2458","kept":"53.3%","cut":"1075 px top and bottom"} edge: a photo with an odd side, 3668 x 4139 at 4:5: the box comes back 1 px taller than the photo (calculator rounds to even; DEFECTS.md, OPEN P3) ran: node ../pub/crop-run.cjs 3668 4139 4:5 exit=0 | {"W":3668,"H":4139,"ratio":"4:5","box":"3312 × 4140","kept":"90.3%","cut":"178 px left and right"} edge: no arguments ran: node ../pub/crop-run.cjs exit=2 | usage: node crop-run.cjs W H tw:th ... (e.g. 3872 2592 1:1 4:5 4:3) edge: ratio typed as 4x5 ran: node ../pub/crop-run.cjs 3872 2592 4x5 exit=2 | usage: node crop-run.cjs W H tw:th ... (e.g. 3872 2592 1:1 4:5 4:3) published: bash test-run.sh ran: bash pub/test-run.sh . > test-results.txt exit=0 | 68 lines, same as test-results.txt apart from the date line: yes edge: no work folder ran: bash ../pub/test-run.sh exit=1 | ../pub/test-run.sh: line 15: 1: usage: test-run.sh edge: folder without the photos ran: bash ../pub/test-run.sh /tmp exit=1 | missing photos/candle-wax.jpg published: python3 make-figs.py ran: python3 pub/make-figs.py . exit=0 | wrote fig/bytes-chart.html and fig/crop-zones.html edge: folder without test-results.txt ran: python3 ../pub/make-figs.py /tmp exit=1 | usage: make-figs.py (needs test-results.txt and crop-all.jsonl)