@@ -32,16 +32,17 @@ namespace :cortex do
3232 naming_data : {
3333 title : fieldTitle . id
3434 } ,
35- versions : {
36- large : { process : { method : 'resize_to_limit' , config : { width : '1800' , height : '1800' } } , format : :jpg } ,
37- medium : { process : { method : 'resize_to_limit' , config : { width : '800' , height : '800' } } , format : :jpg } ,
38- default : { process : { method : 'resize_to_limit' , config : { width : '300' , height : '300' } } , format : :jpg } ,
39- mini : { process : { method : 'resize_to_limit' , config : { width : '100' , height : '100' } } , format : :jpg } ,
40- micro : { process : { method : 'resize_to_limit' , config : { width : '50' , height : '50' } } , format : :jpg } ,
35+ versions : { # Move to YAML
36+ large : { process : { method : 'resize_to_limit' , config : { width : '1800' , height : '1800' } } } ,
37+ medium : { process : { method : 'resize_to_limit' , config : { width : '800' , height : '800' } } } ,
38+ default : { process : { method : 'resize_to_limit' , config : { width : '300' , height : '300' } } } ,
39+ mini : { process : { method : 'resize_to_limit' , config : { width : '100' , height : '100' } } } ,
40+ micro : { process : { method : 'resize_to_limit' , config : { width : '50' , height : '50' } } } ,
41+ rss : { process : { method : 'resize_to_limit' , config : { width : '840' , height : '840' } } } ,
4142 } ,
4243 keep_files : [ :destroyed , :replaced ] ,
4344 path : 'media/<%= attachment %>/<%= original_name %>-<%= style %>-<%= generated_hex %>.<%= extension %>' ,
44- storage : {
45+ storage : { # Move to YAML
4546 type : 's3' ,
4647 host_alias : ENV [ 'HOST_ALIAS' ] ,
4748 config : {
@@ -54,6 +55,33 @@ namespace :cortex do
5455 cache_control : 'public, max-age=315576000'
5556 }
5657 }
58+ } ,
59+ image_optim_config : { # Move to YAML
60+ allow_lossy : true ,
61+ jpegoptim : {
62+ allow_lossy : true ,
63+ strip : 'all' ,
64+ max_quality : 60
65+ } ,
66+ pngquant : {
67+ allow_lossy : true ,
68+ quality_range : {
69+ begin : 33 ,
70+ end : 50
71+ } ,
72+ speed : 3
73+ } ,
74+ gifsicle : {
75+ interlace : true
76+ } ,
77+ advpng : false ,
78+ jhead : false ,
79+ jpegrecompress : false ,
80+ jpegtran : false ,
81+ optipng : false ,
82+ pngcrush : false ,
83+ pngout : false ,
84+ svgo : false
5785 }
5886 } )
5987 media . fields . new ( name : 'Description' , field_type : 'text_field_type' , validations : { presence : true } )
0 commit comments