Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use saliency to suggest a subject-centered crop, not to decide the final composition automatically. First define the image slots your storefront actually uses; then choose whether each slot needs a resized version of the same composition or a separately art-directed crop. For every target ratio, preview the result and keep a manual adjustment or alternate-image fallback for cases where the subject, product edges, or overlay text would be compromised.

Start with the storefront’s actual image slots

List the hero placements you need to support and record each slot’s displayed dimensions, target aspect ratio, and relevant breakpoints. There is no universal desktop or mobile ratio: the right dimensions come from your theme or storefront layout. Also note where copy or controls overlay the image, because a crop that preserves the subject can still leave insufficient room for readable text.

Treat those slot definitions as inputs to the image workflow. A desktop crop and a narrow mobile crop may have different bounds even when they begin with the same source image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Decide between resolution switching and art direction

These are different problems. Resolution switching serves the same composition at different pixel sizes, so it remains visually suitable as the display size changes. Art direction changes the composition for a viewport—for example, by repositioning the subject or choosing a tighter crop. If one crop cannot work for both wide and narrow slots, generate or serve separate crops rather than expecting a single focal point to solve it.

#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option
Approach What changes When it fits
Resolution variants Pixel dimensions; composition stays the same. The source composition works at each target ratio and only output size needs to change.
One crop with a focal point Crop position follows one chosen point as the frame changes. The same important area should remain visible across placements.
Separate art-directed crops Source crop or composition can differ by slot or viewport. One focal point cannot preserve the desired composition for every placement.

Google Web Designer’s guidance describes focal points for responsive images and recommends separate images with viewport-specific display rules when different viewports need different focal positions (Google Web Designer Help: Focal points for responsive images).

Use saliency as a crop candidate, not a verdict

Saliency analysis estimates which regions may attract attention or identifies likely foreground objects. Apple describes attention-based saliency as estimating areas people are likely to look at, while object-based saliency identifies foreground objects and returns up to three bounding boxes. Apple’s documentation describes attention heatmaps as 68 × 68 cells with values from 0 to 1; these are Apple Vision details, not Go API specifications. See Apple Developer Documentation: Cropping Images Using Saliency.

A Go workflow can use the resulting region as a suggested focal area, but saliency is not a guarantee of commercially appropriate framing. It may prioritize an area that is visually noticeable without respecting product boundaries, planned copy placement, or the intended balance of the design. Apple also notes that when no region is salient, its attention heatmap highlights the center, which may not match the editorially important subject.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not assume Apple Vision is directly callable from any Go deployment: using it would require an integration layer or a platform-specific service. For a Go-ecosystem example, Hugo’s official imaging documentation lists the Smart crop/fill anchor, which uses muesli/smartcrop to identify an interesting area. Hugo also documents fixed-position crop anchors. This is an example integration, not evidence that it is ideal for every image or standalone Go service: Hugo: Configure imaging and Hugo: Crop.

Build a crop workflow with review and fallback

  1. Define outputs. For each storefront slot, record the target width, height, aspect ratio, and any overlay-safe area required by the design.
  2. Choose a focal input. Use a saliency-derived region as a candidate or set a focal point manually. Keep the source image and chosen focal data available so crops can be regenerated consistently.
  3. Calculate a crop for each target ratio. Fit the target dimensions while keeping the important subject inside the crop bounds. If the crop must shift to retain the subject, verify that it does not cut off product edges or collide with overlay copy.
  4. Render representative previews. Inspect each required slot at its actual layout proportions, including viewport sizes on either side of breakpoints. Check the subject, margins, text space, and visual balance rather than relying only on a saliency map.
  5. Adjust or art-direct exceptions. If a focal point cannot produce acceptable results in every slot, set a manual crop for that slot or supply a separate art-directed source image.
  6. Specify a weak-signal fallback. When saliency is absent or misleading, use a reviewed manual focal point or a deliberately chosen crop. If the source cannot support the target ratio without losing essential content, choose another source image or revise the slot composition.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Apply focal points only where the delivery theme supports them

A focal point can help keep an area visible while a theme crops an image, but the result depends on how the theme implements cropping. Shopify’s help documentation says one focal point is available per image and applies wherever that image is used (Shopify Help Center: Uploading images). That global behavior may be insufficient when desktop and mobile compositions need different focal positions.

In Shopify Liquid, the focal_point object exposes X and Y percentages and defaults each to 50 when no point is set. Shopify documents applying it through image_tag as CSS object-position (Shopify developer docs: Liquid focal_point object). Confirm that the theme’s image rendering path actually uses this data; a stored focal point alone does not guarantee that every template or crop respects it.

Choose the least complex approach that meets the composition

  • Use resolution variants when the composition fits all slots and only pixel dimensions need to change.
  • Use one focal point when the same subject area should remain visible and the theme or delivery path honors that focal metadata.
  • Use separate crops when slot ratios or viewport-specific framing require distinct compositions.
  • Keep human review in the loop when saliency is weak, an overlay changes the usable area, or a crop risks removing important content.

The cited documentation establishes useful crop and focal-point techniques, but it does not establish a comparative benchmark of standalone Go saliency libraries or a measured conversion benefit for saliency-based storefront cropping. Choose a Go implementation based on your deployment constraints and verify its output against the actual storefront layouts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

SaleBestseller No. 1
HTML and CSS: Design and Build Websites
HTML and CSS: Design and Build Websites
HTML CSS Design and Build Web Sites; Comes with secure packaging; It can be a gift option
$14.94
SaleBestseller No. 2
SaleBestseller No. 4

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.