views:

38

answers:

1

Stupid question?

<img alt="Phone_large" src="/system/photos/1/small/phone_large.jpg?1238845838" />

Why ist "?1238845838" added to the image path?

How can I get my path/url without it?

+2  A: 

It's commonly referred to as a "cache buster". Paperclip automatically appends the timestamp for the last time the file was updated.

Say you were to remove the cache buster and use /system/photos/1/small/phone_large.jpg instead. The URL wouldn't change when you changed the image and your visitors would see the old image for as long as they had it cached.

If you want to remove it just call .url(:default, false). Of course you can change :default to any other style you've defined.

aNoble
If you are using image_tag helper timestamp will be added anyway, by Rails.
Art Shayderov