Skip to content

Instantly share code, notes, and snippets.

View guidipolito's full-sized avatar
🎯
Focusing

Dipolito guidipolito

🎯
Focusing
View GitHub Profile
@guidipolito
guidipolito / .rb
Created April 12, 2024 22:36
optimize all png and jpeg inside the actual directory
# image_optimizer requires availability of
# - pngquant
# - optipng
# - jpegoptim
require "image_optimizer"
require 'parallel'
def image?(file)
file =~ /\.(jpe?g|png)$/
end