Tips

Shoo Kyuk Wei edited this page Mar 25, 2018 · 8 revisions

Removing Timestamps

Paperclip will automatically add a timestamp, based on the updated_at property of the attachment, to the end of urls in an effort to ease caching. This isn’t always what you want, though. To remove this, pass “false” as the second argument to #url, and the url will be generated without the timestamp.

<%= image_tag @image.source.url(:large, false) %>

or you can disable it at global level (initializers or config/environments/*)

Paperclip::Attachment.default_options.update({
  ...
  use_timestamp:  false
})