4
任何紅寶石實現與回形針自動刷新亞馬遜s3圖像?AutoSmusher亞馬遜S3優化圖像?
PS:我google了一下,得到這個:https://github.com/grosser/smusher,在我的本地機器上工作得非常好。但在亞馬遜S3上使用這樣的東西。爲此,擁有一個自動化的流程將會很好,並且可以刷新新創建的內容。有任何想法嗎?
我正在使用一些優化用戶上傳圖片的代碼。
has_attached_file :attachment, {
:styles => {
:medium => ["654x5000000>", :jpg],
:small => ["260x50000000>", :jpg],
:thumb => ["75x75#", :jpg],
:facebook_meta_tag =>["200x200#", :jpg]
},
:convert_options => {
:medium => "-quality 80 -interlace Plane",
:small => "-quality 80 -interlace Plane",
:thumb => "-quality 80 -interlace Plane",
:facebook_meta_tag => "-quality 80 -interlace Plane"
},
:s3_headers => { 'Cache-Control' => 'max-age=315576000', 'Expires' => 10.years.from_now.httpdate }
}.merge(PAPERCLIP_STORAGE_OPTIONS)
但靜止圖像可以優化。我得到了寶石清洗機,但困惑如何使用它。我現在的頁面排名按照GTmetrics在這裏。