Reduce And Resize Dropbox Camera Uploads Automatically With Hazel
I usually use my iPhone to take pictures for my Website and then upload them via the Dropbox app so they appear on my computer. This is a nice feature, but the photos are way too large to use on a Website. Instead of opening each one in Preview, scaling it down and saving it. I created a Hazel workflow that does this for me automatically. It then copies the original file to the Photos folder.
You will notice I have workflow for the LaunchAgent/LaunchDaemon folders. Those are for my roll-your-own malware detection, which works nicely!
The script is pretty straightforward. I just run two commands–one to copy the file and one to scale it down.
cp "$1" ~/Dropbox/Photos/ sips -Z 800 "$1"
Then, I have a rule that looks for any jpg or png files and runs an embedded script on the results. The sips (scriptable image processing system) command is built-in to OS X, but you could also use something like ImageMagick if you wanted. Personally, I tend to use native commands before installing additional software.