yaru
yaru

Reputation: 1310

How to get an unmodified URL for an image?

I have a logo on my website that I want to use on other site as well. (I can't copy it there).

On main site it's specified as <%= image_tag "logo_new_v1.jpg" %>

After assets:precompile it's get changed to logo_new_v1-319364c3d16b335b3c99827b797a21bf.jpg

So the only way (which I found) to reference it from another site is using this URL: http://www.domain.com/assets/logo_new_v1-319364c3d16b335b3c99827b797a21bf.jpg

But instead I would prefer to reference it by this one: http://www.domain.com/assets/logo_new_v1.jpg

Is it possible?

Upvotes: 0

Views: 50

Answers (2)

Baldrick
Baldrick

Reputation: 24340

You can use the non-stupid-digest-assets gem to force the asset pipeline to keep the original image file.

Upvotes: 2

yaru
yaru

Reputation: 1310

OK, here's correct way to do it. http://www.domain.com/assets/logo_new_v1.jpg

Upvotes: 0

Related Questions