Skip to main content

Best Practices for using images in Horizon

Ensure your images are crisp and clear in your leaflet without sacrificing load speed.

Updated over a month ago

For most leaflets, our users want to add extra non-product visual elements, such as headers, footers, dividers etc.

When you want to add extra non-product images, there are some considerations to ensure your images are crisp and clear in your leaflet without sacrificing load speed.

📖 In this article:

How Horizon handles images

Horizon is designed to be fully dynamic and automatically adapts content, such as images, to the screen size of the viewport size of the device (phone, tablet or desktop) it’s being viewed on.

So, Horizon doesn’t simply serve the original image. Instead, it automatically generates an optimized version of the image.

That means:

  • Compression is applied to balance visual quality and load speed.

  • The image’s dimensions are adjusted to match the display area.

Best practices for images in Horizon

To get the best results when adding images, you should:

Upload images that are 1200 pixels wide

1200 pixels width ensures the images look sharp on larger displays (e.g., desktop screens), and can be downscaled on smaller devices without loss of quality.

If an image is uploaded with a width below 1200 pixels, Horizon may need to upscale it to fit larger screens. Upscaling can lead to pixelation of the image.

Keep file sizes reasonable

Even with optimization, smaller source files help improve load speed and performance of your leaflet.

There is no in-built maximum size for most file types, but we recommend using images with a maximum file size of 10 MB or lower.

Please note that GIFs are limited to a maximum file size of 10 MB.

Supported image formats

Format

Description

Benefits

Potential drawbacks

JPEG (.jpg)

Best for photos and complex images

Small file sizes, wide support

Loses some quality due to compression

PNG (.png)

Ideal for images with transparency or sharp edges (e.g., logos, icons)

Lossless quality, supports transparency

Larger file sizes compared to JPEG

WebP (.webp)

Modern format combining best of JPEG and PNG

Smaller file sizes, good quality, supports transparency

Not supported on some old browsers

SVG (.svg)

Vector format for icons, logos, and illustrations

Scales infinitely without losing quality

Not suitable for detailed photos

GIF (.gif)

Best for simple animations and low-color graphics

Supports animation and 1-bit transparency

Limited to 256 colors, large file sizes

If you want to add a GIF to your leaflet, it may be worth considering if the animation could be obtained and added as an MP4 instead, as this can improve load speed. You can read more about our best practices for GIFs here.

Summary

  1. Horizon automatically adapts images for different screen sizes.

  2. It serves optimized versions of assets — resizing and compressing as needed.

  3. Best practices:

    1. Upload at least 1200px wide images.

    2. Keep file sizes reasonable. 10 MB is the recommended maximum.

  4. Supported formats: JPEG, PNG, WebP, SVG and GIF.

Did this answer your question?