Summer Sale! All accounts are 50% off this week.

agilasadi's avatar

Setting up Spatie image optimization tools on Windows

I've asked a similar question some time ago but didn't get any response. Did a lot of digging and asked the question in many chat groups, it seems like nobody ever tried using Spatie on Windows home. The issue is that I can easily set up and start using the package, but there is almost no way to set up those tools spatie uses. I considered using Docker, but I can not install Docker on Windows Home. So really stuck with tools, it throws no errors but doesn't really optimize images.

0 likes
5 replies
agilasadi's avatar

Ues you are right that is the package I use, I actually tried to link that but couldn't do. I'm trying all the tools. VirtualBox option has been recommended to me a few times but I don't see it as a sold solution, because there are some other people working on the project, I don't know how this is gonna affect them due to my inexperience. Can't I manually set the tools up?

D9705996's avatar
D9705996
Best Answer
Level 51

@AGILASADI - If you want go use the package your going to need to install the optimized software. I dont know what you have tried or what problems you faced.

To be honest though your best bet is going to be to use something like homestead using the virtualbox provider.

I would read the documentation carefully and follow along with a tutorial like (this is just first result of many from Google- find one you like/understand)

https://medium.com/@eaimanshoshi/i-am-going-to-write-down-step-by-step-procedure-to-setup-homestead-for-laravel-5-2-17491a423aa

This will give you a linux server already setup for a laravel development environment which you can run the install commands from the package readme

sudo apt-get install jpegoptim
sudo apt-get install optipng
sudo apt-get install pngquant
sudo npm install -g svgo
sudo apt-get install gifsicle
1 like
agilasadi's avatar

@D9705996 - Thanks a lot, I'm gonna try that right now, and if there are no any other recommendations until I get that working your way, I will sign this answer as the best answer <3

1 like
Pratikkuikel's avatar

If anyone is still trying to figure out how to optimize images in windows, This is the way :

  1. Get chocolatey for windows.
  2. Install necessary binaries (stated in package's readme) using chocolatey.

choco install jpegoptim

Run terminal as administrator.

Please or to participate in this conversation.