#urls-to-images
Summary: I received a large list of URLs and downloaded all the images in JPG format, creating 200x200 thumbnails for each of them. Additionally, I also converted the images to WebP format for my website.
URL: example.com/image/Dierenartsen-Leek-Kittens.jpg
Folders | Image |
jpg | Dierenartsen-Leek-Kittens.jpg |
thumbs-jpg | Dierenartsen-Leek-Kittens.jpg |
thumbs-webp | Dierenartsen-Leek-Kittens.webp |
webp | Dierenartsen-Leek-Kittens.webp |
Note that this works for images of various sizes like 400x400, 600x600, 800x800, and so on.
1.Makes an HTTP GET request to each URL to fetch image data.
2.Converts the image data into both JPG and WebP formats.
3.Creates 200x200 pixel thumbnails in both JPG and WebP formats.
4.Saves the images and thumbnails in specified directories.
5.Handles errors, including failed HTTP requests and exceptions during the process.
Example usage is provided with a list of URLs, and directories for storing the images and thumbnails are created if they don't already exist. The program automates the process of downloading, converting, and saving images, making it easy to work with image data from URLs.