bernabas
bernabas

Reputation: 481

Is it possible to restyle a picture after getting uploaded in paperclip?

if pictures are uploaded using one style, how can i change the style of the uploaded picture after the picture is already uploaded. say if i want to change from tiny or thumb to original? Thanks,

Upvotes: 1

Views: 70

Answers (1)

Mark Huk
Mark Huk

Reputation: 2380

  1. If you specified for example two styles :thumb and :grid and uploaded image to it, then you already have three images by default: grid, thumb and original. So in your views you could just use <your attachment>.path(:thumb) or <your attachment>.path(:grid).
  2. Anyway if you added some more styles to your model you should call rake paperclip:refresh:missing_styles.

Documentation

Upvotes: 2

Related Questions