Remove Unused Images from Rails Application
In a Rails application, unnecessary images/CSS/JS will affect application load time and also stretch the deployments.
In one of our projects, we had over 1500+ images. This was making our life difficult; especially “asset precompile”. It was very difficult to find images which were not in use.
Here is a small ruby script to find all unused images and get rid of unused images:
Run above script on rails console to remove all unused files.
Hope this helps!
At BoTree Technologies, we build enterprise applications with our RoR team of 25+ engineers.
Consulting is free – let us help you grow!
Choose Your Language
- Digital Marketing
- IT Consulting
- Project Management