Tag Archive for 'Tips'

Speeding up Coppermine with htaccess

Coppermine, being a photo gallery or infact a media gallery, as it can serve much more than just images, faces a daunting task of transfering a lot of data to browser with every single request. This is not just bandwidth eater but sometimes also frustrating to users when they have to keep waiting for the complete page to be loaded.

To speedup the page loading without putting much pressure on the server, we can use some proven techniques. This post will discuss the htaccess way to better the page loading by caching and compressing the page contents wherever possible. Continue reading ‘Speeding up Coppermine with htaccess’

Batch resize using ImageMagick

One of the most common task I perform before uploading photos in my coppermine gallery is resizing all pictures to a more internet friendly size.

Over the period of time I have found ImageMagick to be very useful when it comes to manipulating images. Below are the commands commonly used for resizing images.

To resize all images in current directory to 800 width (height will be reduced proportionately) :

mogrify -resize 800 *.jpg

Resize all images to 800 height (width will be reduced proportionately)

mogrify -resize x800 *.jpg

Resize all images to a maximum dimension of 800×800. This means that max of width and height will be considered while resizing :

mogrify -resize 800×800 *.jpg

Reduce the size of images to the percent of original :

mogrify -resize 75% *.jpg

Note that in all above commands the original file will be replaced with the new one. Also the examples given above uses only jpg files but you can surely do it with other image formats as well.