Skip to content
NaturaLife HTML Template

Images and Logos

Learn how to replace photos and logos, generate responsive image sizes from the source, and adjust crops for different screen sizes.

Replace the image files in dist/assets/, or update their paths in your HTML. Check both src and srcset: a browser may select a different image at another screen size. Keep suitable image proportions and enough resolution for the displayed size.

For logos, update the normal and light versions and their 2× files. Keep the displayed width and height appropriate for your new logo.

  1. Find the image in Source/src/data/image-pipeline.json.
  2. Replace the original file listed in its source field, under Source/src/. For example, assets/images/content-boxes/blog-6.jpg is relative to that folder.
  3. Run npm run build from Source/, or leave npm run dev running while editing.
  4. Check the resulting image and crops at desktop and mobile widths.

The build uses Sharp to create registered thumbnails and responsive sizes. You do not need an image processor on your web host. Replace the master image rather than editing generated thumbnails, which will be overwritten on the next build.

Original files are never overwritten: generated sizes are cached under Source/.cache/images. npm run images prepares only this cache; npm run build also updates the ready HTML and image files in dist/. Logos are not resized automatically and keep their normal and 2× files.

The photo profile crops an image to fill its frame. product fits the complete product on white, while transparent preserves transparent cutouts. An optional focalPoint, such as [0.65, 0.35], moves the crop focus; values run from 0 to 1 from the top-left corner.

Register new images and their output sizes in image-pipeline.json if you need automatic thumbnails. Unregistered files are copied unchanged. CSS backgrounds do not receive an image element’s responsive srcset behavior.

Small source images are not enlarged automatically. Use a sufficiently large master and check faces, transparent edges and logo sharpness. The included Source/IMAGES.md explains advanced crop and output settings if needed.