Not a developer? Go to MovableType.com

Ask an Expert

Thumbnail file sizes can end up larger than original image

Asked by John Smith
Posted August 13, 2013.

Sometimes when an image is resized by Movable Type, the resulting image’s file size is larger than the original! What’s going on here?

Back

1 Answer

Dan Wolfgang

Dan Wolfgang on August 16, 2013, 1:06 a.m. Reply

Movable Type can build differently-sized images when inserting an image into an Entry, for example, or when using the AssetThumbnailURL tag. This might be for a thumbnail, a specially-cropped image from the ImageCropper plugin, or any other custom use.

If the image is a .jpg file it’s saved with a default high-quality low-compression setting that ensures the image will look good at the expense of creating a large file. Most typically, you may notice that the thumbnailed image is larger than you expect, but if a highly-compressed image is thumbnailed you may notice it’s even bigger than the original!

I wrote a plugin to deal with this problem: Asset Image Quality. After installing the plugin you can configure it to use a different compression level for any new images Movable Type creates.

The ImageMagick library is most often used to do this because, simply, it’s the best! However, Movable Type also supports the GD, NetPBM, and Imager libraries through the ImageDriver configuration directive. The Asset Image Quality plugin only works with ImageMagick.

Dan Wolfgang

Dan is an engineering creative and uses his vast knowledge of the web to solve unique client problems with specialized solutions. Complex or straightforward, his focus is to find the most efficient, functional, elegant, and stable solutions for each project. 10 years in web engineering and 14 more in the print publishing industry give him a special insight to the needs, restrictions, and workflows of content publishers, both traditional and new media. Dan is an active Movable Type community member who has written and contributed to countless plugins including some of the most popular: More Custom Fields, Poll Position, and Asset Image Quality.

Website: http://uinnovations.com
Twitter: @danwolfgang

Ask An Expert