|  | @@ -1,3 +1,17 @@
 | 
												
													
														
															|  |  # tinypng
 |  |  # tinypng
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | -Bash script for automatically uploading JPG/PNG files to https://tinypng.com/ for image compression.
 |  | 
 | 
												
													
														
															|  | 
 |  | +Bash script for automatically uploading JPG/PNG files to [TinyPNG](https://tinypng.com/) for image compression. Free for \<500 images per month.
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +Pretty good service if you want minimally sized photos: my 100% quality JPEGs compressed to ~60% of their original size with only a slight decrease in overall sharpness. File size from Google's image compression from Google's [pagespeed tool](https://developers.google.com/speed/pagespeed/insights/) was smaller by ~10%, but the quality was noticeably lower in comparison. For my use case, I only compressed the resized photos and thumbnails used on the front page of my site to improve page load speed.
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +Uploaded files (from the running directory) are logged to avoid compressing the same file multiple times.
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +## Usage:
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +Compress all PNG files in a given *subdirectory* (and all subfolders):
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +    ./tinypng.sh subdirectory/ '*.png' 
 | 
												
													
														
															|  | 
 |  | +   
 | 
												
													
														
															|  | 
 |  | +Compress all JPG thumbnails in the current directory (and all subfolders):
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +    ./tinypng.sh . '*thumb*.jpg'
 |