Posted almost 8 years ago. Visible to the public.

Avoid png file uploads with RSpec + Paperclip + Imagemagick

File uploads with .png are +10 times slower than using .jpeg or .gif.

Copy
# Bad post :create, { :property_id => property.id, :photo => { :image => File.open("#{Rails.root}/public/images/foo.png") } } # Good post :create, { :property_id => property.id, :photo => { :image => File.open("#{Rails.root}/public/images/foo.jpeg") } }

Owner of this card:

Avatar
Pedro Cunha
Last edit:
almost 8 years ago
Posted by Pedro Cunha to HouseTrip Deck
This website uses short-lived cookies to improve usability.
Accept or learn more