Overview
The goal of image file size optimization is to reduce the size of image files without losing significant quality. Reducing the size of image files reduces the amount of data your visitors have to download and reduces the amount of disk space required by your site.
This help pages describes manual image file size optimization. GedSite includes the Exhibits.Optimize Image Files property to enable automated image file size optimization. GedSite's automated tool will do a reasonable job, but manual optimization provides the opportunity to fine-tune the changes to the specific content of the image.
Save the Original
Never alter the original image file. Make a copy and edit the copy. Save the original in a safe place. Use the optimized image with GedSite.
If you want to use the optimized image with your genealogy application and with GedSite, adjust the image's file path in your genealogy application to refer to the optimized image file rather than the original image file.
If you want to use the original image with your genealogy application, but you want to use an optimized image with GedSite, see the instructions for using the Exhibits.Alternate Folder property .
Steps
These are the basic steps in image file size optimization.
- Avoid uncompressed image types, like TIF. Convert those images to JPG or PNG.
Typically, you should choose JPG for photographs and PNG for scanned documents. PNG is better for documents because it often will render small text, lines, and other man-made graphics more precisely than JPG. However, if JPG yields a legible version of a scanned document, and the JPG image file is smaller than a PNG version, use the JPG version.
- Reduce the pixel dimensions of large images.
For example, if an image is 3000 pixels by 2000 pixels, reduce it to 1500 pixels by 1000 pixels, or smaller. Reducing the pixel-dimensions of an image will significantly reduce the size of the image file.
Many people viewing your site will be using devices with small screens. The browser will reduce the pixel dimensions to fit the window, so sending a large image wastes network bandwidth and disk space.
- For PNG images, reduce the size of the color palette.
A PNG image using 64 colors will have a smaller image file than a PNG image using 256 colors.
This optimization has to be applied carefully; reducing the size of the color palette may degrade the image to an unacceptable level.
- For JPG images, increase the compression level.
Use the highest compression that yields a good quality image. You may be surprised that high compression levels (AKA "low quality") often yield acceptable images.
When saving a JPG/JPEG image, some image editors refer to image quality rather than compression level. Image quality and compression level have an inverse relationship: high image quality means low compression level, and low image quality means high compression level.
Other File Types
PDF Files
PDF files are more difficult to optimize than other file types. They are not image files, they are a container that may contain text and images, and most people do not have good PDF editing tools.
If a PDF holds a single image, convert it to an image file. For an image of a document, it's usually best to use PNG. For an image of a photograph, it's usually best to use JPG.
If the PDF is a mix of images and text, you probably have to leave it as a PDF, and you probably can't optimize it. One thing to consider there is to put the PDF file on some (free) file hosting service and remove it from your site. Link to the PDF file on the other site and do not include it directly on your site.