Back to Browse

Optimized Images in Seconds | Python Image to Webp Converter

4.0K views
Jun 14, 2022
13:32

Webp format is an easy way to decrease your image load times on your website. Here's a python script to convert your images all at once, with the best settings for png and jpg. For an explanation on getting the file extension using .split(), check out my article here: https://notdefined.tech/blog/get-the-extension-of-a-filename-in-python/ _______________ Get the code for this project here: https://notdefined.tech/blog/auto-convert-all-images-to-webp-format-instant-load-time-improvement/ NOTE: There's a bug in line 21 of this video's script. Change it to this is allow nested folders: convert_to_webp(imagefile, os.path.join(root, "")) _______________ Do more with what you have. WHO AM I? 👨🏻‍💻 My name is Jess, I'm a designer turned web developer with a disability: Multiple Sclerosis. Technology helped save my career and my livelihood, so I want to pass along the knowledge. LET'S CONNECT ✍️ Subscribe to the NDT blog - https://notdefined.tech/#/portal/signup 📸 Instagram - https://www.instagram.com/notdefinedtech/ FAVORITE HOSTING PLATFORM 🌊 DigitalOcean—Support the channel AND get $100 credit for 60 days with this referral link: https://m.do.co/c/5d4981832ae6

Download

0 formats

No download links available.

Optimized Images in Seconds | Python Image to Webp Converter | NatokHD