cancel
Showing results for 
Search instead for 
Did you mean: 

Small Image Not Appearing in Search Results

SOLVED

Small Image Not Appearing in Search Results

Hi Guys

 

I replaced the placeholder product images on my Magento 2.4.5 site

 

 I resized and also replaced the 

small_image.jpg

swatch_image.jpg

thumbnail.jpg

 

I saved them into: pub\static\placeholder

 

The new placeholder image is now appearing on the products fine, however now just about every small_image.jpg is not showing up when I run a search with Elastic Search

 

An example of an image that should be showing is:

 

 

you can see from here that once you at the product page the image is there and fine:

 

https://www.sparetoolparts.co.uk/bostich-d60ads-no-longer-available-000000-00-spare-part.html

 

When I look in the backend of the site, the image is showing the thumbnail and all other version of the image fine, it is just the front end.

 

I've cleared cache and image cache but still nothing

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Small Image Not Appearing in Search Results

You should have done this through Admin, under Stores > Configuration > Catalog > Catalog > Product Image Placeholders

Founder at https://agency418.com

View solution in original post

3 REPLIES 3

Re: Small Image Not Appearing in Search Results

You should have done this through Admin, under Stores > Configuration > Catalog > Catalog > Product Image Placeholders

Founder at https://agency418.com

Re: Small Image Not Appearing in Search Results

Now done 

 

And a re-indexing has solved the problem, thanks for your help :-)

Re: Small Image Not Appearing in Search Results

Hi @salessparefd20,

 

If small images are not appearing in search results in Magento 2, there could be several reasons for this issue. Here are some steps you can take to troubleshoot and resolve the problem:

 

  • Reindex: Ensure that your Magento 2 indexes are up to date. Sometimes, missing images in search results can be caused by outdated indexes. You can reindex your data using the command-line interface (CLI) or through the Magento Admin Panel (System > Index Management).

 

  • Check Image Attributes: Verify that the small image attribute is correctly set for the products in your catalog. In the Magento Admin Panel, navigate to Catalog > Products, select a product, and ensure that the small image attribute is assigned with the correct image.

 

  • Flush Cache: Clear the Magento cache to ensure that any cached data, including images, is refreshed. You can do this through the Magento Admin Panel (System > Cache Management) or using CLI commands.

 

  • Check File Permissions: Make sure that the image files associated with your products have the correct permissions set on the server. Incorrect file permissions can prevent images from being displayed in search results.

 

  • Theme Compatibility: Ensure that your current theme is compatible with Magento 2 and supports the display of small images in search results. Sometimes, custom themes or extensions can affect the rendering of search results.

 

  • Check Search Configuration: Review your search engine configuration in Magento 2 (e.g., Elasticsearch, MySQL). Ensure that the search engine is properly configured to index and retrieve small images along with other product data.

 

  • Inspect Browser Console: Use your browser's developer tools to inspect the network requests and console messages while loading the search results page. Look for any errors or warnings related to missing images that may provide clues about the issue.

 

  • Debugging: If necessary, add logging or debugging statements to relevant Magento files (e.g., search result templates, controllers) to track the flow of data and identify any issues with image retrieval or rendering.

 

  • Extension Compatibility: If you're using any third-party extensions related to search functionality or product images, ensure that they are compatible with your Magento version and configured correctly.

 

Also, You should have done this through Admin, under Stores > Configuration > Catalog > Catalog > Product Image Placeholders
 

If the issue will be resolved, Click Kudos & Accept as a Solution.