 <p>Have a look at the documentation on the website but pretty sure it should be like below:</p> <pre><code>has_attached_file :avatar, :styles =&gt; { :thumb =&gt; ["32x32#", :png] } </code></pre> <p><a href="https://github.com/thoughtbot/paperclip" rel="nofollow">https://github.com/thoughtbot/paperclip</a></p> <p>Under post processing</p> <p>Guess your issue is here:</p> <pre><code>@format = options[:format] @basename = File.basename(@file.path, @current_format) temp_file = Tempfile.new([@basename, @format].compact.join(".")) </code></pre>