Last active
August 19, 2024 15:49
-
-
Save SamJUK/8694ef843cabd62671568f699548bb5b to your computer and use it in GitHub Desktop.
Test Speedsize serving incorrect images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| IMAGE="https://cdn.speedsize.com/52367726-9989-4d4a-be89-5d34aa139dea/static.magrigg.co.uk/media/catalog/product/b/a/barbour_men_s_cirrus_wellingtons_black_5.jpg?width=560&height=739&store=default&image-type=image/w_560" | |
| echo "[i] Fetching Chromium Image" | |
| curl -L $IMAGE \ | |
| -H 'accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8' \ | |
| -H 'Accept-Encoding: gzip, deflate, br' \ | |
| -H 'user-agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36' > chrome.jpg | |
| echo "[i] Fetching Safari Image" | |
| curl -L $IMAGE \ | |
| -H 'Accept: image/webp,image/avif,image/jxl,image/heic,image/heic-sequence,video/*;q=0.8,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5' \ | |
| -H 'Accept-Encoding: gzip, deflate, br' \ | |
| -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15' > safari.jpg | |
| echo "[i] Fetching Safari Image without Accept Header" | |
| curl -L $IMAGE \ | |
| -H 'Accept-Encoding: gzip, deflate, br' \ | |
| -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15' > safari-no-accepts.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment