A second image on hover in Magento 2: previewing without opening the product

2 min read

Silver 3D illustration with accents: violet and apricot — Magento 2 Module: Catalog Hover Image

A second view can explain a product without leaving the listing. Kowal Catalog Hover Image swaps the picture on cursor hover and restores the original when it leaves. Choose a view that adds information, such as the back or a detail.

Define the data and scope

Before changing anything, record the SKU, store view, customer group and currency. Choose one control product and note its initial state. This keeps the comparison tied to the same data rather than two similar screens with different settings.

Prepare the configuration

Enable Stores → Configuration → Kowal → Hover Catalog Image. Assign the gallery image to the role stored in hover_catalog. Prepare a dedicated hover image, a product without that role and a thumbnail identical to the main image. Without a dedicated value, the code checks thumbnail as fallback.

Start in a test environment using the theme and buying process actually used by the store. Change one setting at a time. Record both the selected configuration scope and any inherited value so another administrator can reproduce the result.

Run a concrete scenario

Hover over the first item, leave it and quickly repeat on another. Check restoration of the correct original and stable tile dimensions. Change sorting or a filter to update the listing, then repeat with the new elements. Compare the behavior after reopening the category rather than relying on the first warm interaction.

Keep the result before and after the change. Repeat the exercise with a qualifying product and a case that should remain unaffected. For multiple store views, also check the message language and pricing context.

Check boundaries and accept the implementation

The implementation uses jQuery and RequireJS. Custom list renderers and other themes need integration checks. A phone has no conventional cursor hover, so verify its behavior separately. One image swap is not a multiple-image gallery; assess a richer browsing layer as a distinct feature.

For acceptance, retain the settings, expected result, observed result and test date. Describe discrepancies with a concrete example. After release, check the same journey on a phone and after reopening the page with the cache in use.

Related stages of the process

Swapping one image and browsing several views have different scopes. Choose the simpler mechanism when a second view is enough; assess a gallery with measurements rather than treating extra JavaScript and image transfer as free. See Interactive product photo gallery on the category page in Magento 2 and the guide AI generates photos. Magento can sell them..

Check features and configuration in the offering for Magento 2 Module: Catalog Hover Image.

Previous Next

KOWAL.BLOG

Choose your language

Available versions open the corresponding page. More languages are being prepared.

English (UK) Français Deutsch Español Italiano Português Nederlands Svenska Dansk Norsk Suomi Lietuvių Latviešu Eesti Čeština Slovenčina Magyar Română Български Ελληνικά Slovenščina Hrvatski Polski English (US)