Imagemagick has been creating rediculously large thumbnails on my server -> i.e. 30-40kb for a 100x75 image. After some investigation, I solved it by hard-coding the "-strip" parameter into the _image_imagemagick_convert function on line 84 as so:

$err = _image_exec("$convert_path -strip $filter $source $dest");

Now, when imagemagick builds a thumbnail it comes out between 2-4kb, which is a Massive difference. It seems like everyone in the drupal community would be interested in this, so I think it should either be a the default, or a checkbox in the config screen could be added to enable this.

CommentFileSizeAuthor
#4 image_133215.patch3.2 KBdrewish

Comments

drewish’s picture

for reference: http://www.imagemagick.org/script/command-line-options.php#strip

i'm not sure it should be applied indiscriminately. you want to make sure it's only used when resizing or cropping... you wouldn't really want the original file stripped.

gravit’s picture

Totally wouldn't want it on the original, since you would probably want to keep metadata and profile information on the original. But if "_image_imagemagick_convert" is running on the original and over-writing the original file... Then, well I am gonna have to file another feature request. ;-)

drewish’s picture

Status: Active » Closed (won't fix)

i think this is a specific enough change that it's worth patching the module yourself.

drewish’s picture

Status: Closed (won't fix) » Active
StatusFileSize
new3.2 KB

i've changed my mind on this. i think it would be a useful feature.

drewish’s picture

Status: Active » Needs review
drewish’s picture

Status: Needs review » Fixed

i've committed this.

Anonymous’s picture

Status: Fixed » Closed (fixed)