How to precompile images to public/assets/images

0 votes
asked Mar 28, 2014 by arta

I am using jquery-ui which comes with quite a few images. I have them in public/assets/images. Following the I'd like to have them in vendor/assets/images. This would also avoid deleting them with $ rake assets:clobber.

But when - following Using a jQuery UI Theme with Rails 4 - No Images being served - I put them in vendor/assets/images and precompile, they end up in public/assets which makes this folder quite messy. I want them precompiled to public/assets/images.

I have not found a solution. Is this something trivial that I am missing or is this something unusual to want? Help is appreciated.

1 Answer

+1 vote
answered Nov 29, 2018 by rajesh-omanakuttan

Rails rake assets:precompile command will precompile all assets into static files and will be kept in public/assets only by default. If you want it in a custom folder:

Please refer:

i.e., as per the link,

if you want all the images to be precompiled and stored in '/public/assets/images', you need to create them under 'vendor/assets/images/images' folder.

Hope that helps :)

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter