Closed danielbayerlein closed 11 years ago
That's something we must improve, there is only an helper for image tag and we should provide a simple asset_path helper to get any asset versioned path.
But this code and url without version numbers should work too, are you getting 404s?
@j15e Thanks for your feedback. .png
images works fine, but the favicon (.ico
) is broken.
$ rake assetpack:build
+ /public/assets/images/favicon.ico
+ /public/assets/images/favicon.110302.ico
+ /public/assets/images/touch-icon-ipad-retina.png
+ /public/assets/images/touch-icon-ipad-retina.854426.png
+ /public/assets/images/touch-icon-ipad.png
+ /public/assets/images/touch-icon-ipad.476348.png
+ /public/assets/images/touch-icon-iphone-retina.png
+ /public/assets/images/touch-icon-iphone-retina.660437.png
+ /public/assets/images/touch-icon-iphone.png
+ /public/assets/images/touch-icon-iphone.583499.png
Use Sinatra AssetPack a image compressor?
app/assets/images/favicon.ico
= 100 KB
/public/assets/images/favicon.ico
= 458 Byte
There is no image compressor, but the is a defined list of supported file extensions and that is why ico are rejected (you could extend it, not real reason behind this) :
https://github.com/rstacruz/sinatra-assetpack/blob/master/lib/sinatra/assetpack.rb#L13
I will use a .png
favicon. That's ok for me. :wink:
Thanks for raising the issue, I'll add improving the supported extension list to the improvements list.
Hi guys, how to add a Favicon and Apple Touch Icons with Sinatra AssetPack?