The new storage method of ShelterBuddy allows one to fetch images in a few different ways. It's actually very flexible
The key is appending /---
to the base image URL. Where /-{optional width}-{optional height}-{optional type}
Examples:
Image: default (as it was uploaded). AKA (raw)
https:/demo.shelterbuddy.com/storage/image/0FE1B7E00C7B4EE4B85EA61C85481554-1486498950-1486498950-jpg
Image: 800 wide (Auto width)
https://demo.shelterbuddy.com/storage/image/0FE1B7E00C7B4EE4B85EA61C85481554-1486498950-1486498950-jpg/800--
Image: 800 high (Auto height)
https://demo.shelterbuddy.com/storage/image/0FE1B7E00C7B4EE4B85EA61C85481554-1486498950-1486498950-jpg/-800-
Image: Fit within 300 wide 400 high box (preserve aspect ratio)
https://demo.shelterbuddy.com/storage/image/0FE1B7E00C7B4EE4B85EA61C85481554-1486498950-1486498950-jpg/300-400-
Image: as PNG
https://demo.shelterbuddy.com/storage/image/0FE1B7E00C7B4EE4B85EA61C85481554-1486498950-1486498950-jpg/--PNG
Image: as GIF
https://demo.shelterbuddy.com/storage/image/0FE1B7E00C7B4EE4B85EA61C85481554-1486498950-1486498950-jpg/--GIF
Image: Fit within 300 wide 400 high box (preserve aspect ratio) as PNG
https://demo.shelterbuddy.com/storage/image/0FE1B7E00C7B4EE4B85EA61C85481554-1486498950-1486498950-jpg/300-400-PNG
Image URL format
Follow
Have more questions? Submit a request
Comments