
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
A simple wrapper around image_optim to batch minify all images in one or more directories.
Designed to work with Rails and per default recursively looks for JPGs and PNGs in app\assets\images
and public
.
Add this line to your application's Gemfile:
gem 'image_optim_rake'
And then execute:
$ bundle
Or install it yourself as:
$ gem install image_optim_rake
As above mentions this gem uses image_optim, which itself relies on some binary tools. These must be present at the system, but pngout
is disabled here per default.
sudo apt-get install -y advancecomp gifsicle jpegoptim libjpeg-progs optipng pngcrush
sudo yum install -y advancecomp gifsicle libjpeg optipng
You will also need to install jpegoptim
and pngcrush
from source:
cd /tmp
curl -O http://www.kokkonen.net/tjko/src/jpegoptim-1.2.4.tar.gz
tar zxf jpegoptim-1.2.4.tar.gz
cd jpegoptim-1.2.4
./configure && make && make install
cd /tmp
curl -O http://iweb.dl.sourceforge.net/project/pmt/pngcrush/1.7.43/pngcrush-1.7.43.tar.gz
tar zxf pngcrush-1.7.43.tar.gz
cd pngcrush-1.7.43
make && cp -f pngcrush /usr/local/bin
sudo port install advancecomp gifsicle jpegoptim jpeg optipng pngcrush
brew install advancecomp gifsicle jpegoptim jpeg optipng pngcrush
You can install pngout
by downloading and installing the binary versions.
Note: pngout is free to use even in commercial soft, but you can not redistribute, repackage or reuse it without consent and agreement of creator. license
Copied from: https://github.com/toy/image_optim/
Change to your project directory and run:
$ rake image_optim:minify
You can define the directories where images will be searched recursively by setting a dirs
argument:
$ rake image_optim:minify dirs=app/assets/images,public,lib/assets/images,vendor/assets/images
You can modify the configuration which is passed to image_optim:
ImageOptimRake::ImageOptimTask.config = {
:threads => true,
:pngout => false
}
You can also modify the default paths:
ImageOptimTask.dirs = ["app/assets/images", "public"]
A good place would be an initializer in a Rails environment.
$ rake test
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that image_optim_rake demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.