No description
Find a file
2026-06-30 19:37:53 -04:00
.ai-chats Session wrap-up: document fetch/pull of 5 upstream commits 2026-02-25 18:00:11 -05:00
.planning sync: checkpoint 2026-06-30 2026-06-30 19:37:53 -04:00
.taskmaster Implement batch image-to-WebP conversion tool 2026-02-12 12:31:32 -05:00
docs Add initial project structure and documentation for WebP conversion utility 2026-02-12 12:16:46 -05:00
export Add initial project structure and documentation for WebP conversion utility 2026-02-12 12:16:46 -05:00
import Add initial project structure and documentation for WebP conversion utility 2026-02-12 12:16:46 -05:00
processed Add initial project structure and documentation for WebP conversion utility 2026-02-12 12:16:46 -05:00
.gitignore Implement batch image-to-WebP conversion tool 2026-02-12 12:31:32 -05:00
.repo-meta.yaml sync: checkpoint 2026-03-26 2026-03-26 20:03:25 -04:00
convert.py Implement batch image-to-WebP conversion tool 2026-02-12 12:31:32 -05:00
converter.py Implement batch image-to-WebP conversion tool 2026-02-12 12:31:32 -05:00
README.md Update README with instructions for using shrink_webp.py to optimize image sizes 2026-03-05 19:58:23 -05:00
requirements.txt Implement batch image-to-WebP conversion tool 2026-02-12 12:31:32 -05:00
RESUME.md Session wrap-up: document fetch/pull of 5 upstream commits 2026-02-25 18:00:11 -05:00
shrink_webp.py Add files via upload 2026-02-18 19:21:27 -05:00
test_convert.py Implement batch image-to-WebP conversion tool 2026-02-12 12:31:32 -05:00

STEP ONE: this a is python app that, when run. It will check in the import folder for any images like JPEGs, bitmaps, SVGs, and PNGs. It will convert them to .WEBp files. Clone the files locally.

How to: You will need to install the two required apps in the requirements.txt file. Pillow>=10.0.0 & CairoSVG>=2.7.0

Go to Step TWO

We want to at least provide support for those. We need to create WebP formatted images and use the same exact names as the original files that the app will find in the import folder. It should create a WebP version in the export folder.

If there are folders inside the import folder, we want to respect their folder structures and create the same folder structures in the export folder.

So, let's say we have a static website that has 700 images, for example in JPEG format, and they all have subfolders and such. We would want to respect that same folder structure so that if we're using FTP to upload them back to the web server, they're all in the correct folders.

And in that case, we could just open up the static website in VS Code, do a search for .jpg, perform a global search and replace to convert them to .webp, and then boom, everything would work.

Okay, so after you create each of those files, you put them in export. I want you to take the file that was just processed and move it over to processed. And again, still respecting those folder structures. Help me plan all this out. That's the MVP. Let's get it done.

STEP TWO:

Go to the folder that contains all the files "Drive Letter:\Folder Name\convert-to-webp" Click in the address bar and type "cmd" and a console will open. Now type "python convert.py" and it will convert all image files to .webp files, you will receive status on the files converted. STEP One completed. Next, go to the folder that contains the .webp files (it will be "export" if no changes were made). Add shrink_webp.py to that folder. Run shrink_webp.py script in a folder with converted files (i.e.export folder) to reduce the size of each file to unde 250 kb, best for SEO. By adding "cmd" to the address bar as above, now, type "python shrink_webp.py" As best as it can, it will reduce to under 250 kb. Some images will lose too much and denegrade, those will be skipped. You will received status on all the files. Enjoy!

  • MK