1

Magento version - Adobe Commerce ver. 2.4.5-p1

Issue - Product images are not showing up on the front end.

I'm debugging this file, getting below data.

vendor/magento/module-catalog/view/frontend/templates/product/view/gallery.phtml


echo "<pre>";
print_r($mainImage);
exit;

Magento\Framework\DataObject Object
(
    [_data:protected] => Array
        (
            [value_id] => 195402
            [file] => /c/o/controlflex-coupling-cpfrg16-25-at.jpg
            [media_type] => image
            [row_id] => 56037
            [label] => CPFRG16/25-AT - Controlflex Coupling Frog
            [position] => 1
            [disabled] => 0
            [label_default] => CPFRG16/25-AT - Controlflex Coupling Frog
            [position_default] => 1
            [disabled_default] => 0
            [video_provider] => 
            [video_url] => 
            [video_title] => 
            [video_description] => 
            [video_metadata] => 
            [video_provider_default] => 
            [video_url_default] => 
            [video_title_default] => 
            [video_description_default] => 
            [video_metadata_default] => 
            [url] => http://local.projectsetup.com/media/catalog/product/c/o/controlflex-coupling-cpfrg16-25-at.jpg
            [id] => 195402
            [path] => /var/www/html/projectsetup/pub/media/catalog/product/c/o/controlflex-coupling-cpfrg16-25-at.jpg
            [small_image_url] => http://local.projectsetup.com/media/catalog/product/cache/75d5f1f9c56243b29d3c2276c04865ad/c/o/controlflex-coupling-cpfrg16-25-at.jpg
            [medium_image_url] => http://local.projectsetup.com/media/catalog/product/cache/426e0568c4ced36d62c614ab0f9619f2/c/o/controlflex-coupling-cpfrg16-25-at.jpg
            [large_image_url] => http://local.projectsetup.com/media/catalog/product/cache/982cff22d03368d7a9f3983da767218f/c/o/controlflex-coupling-cpfrg16-25-at.jpg
        )

)

I have checked this URL: http://local.projectsetup.com/media/catalog/product/c/o/controlflex-coupling-cpfrg16-25-at.jpg , I was able to open the product image.

cache images are not generating.

[small_image_url] => http://local.projectsetup.com/media/catalog/product/cache/75d5f1f9c56243b29d3c2276c04865ad/c/o/controlflex-coupling-cpfrg16-25-at.jpg
[medium_image_url] => http://local.projectsetup.com/media/catalog/product/cache/426e0568c4ced36d62c614ab0f9619f2/c/o/controlflex-coupling-cpfrg16-25-at.jpg
[large_image_url] => http://local.projectsetup.com/media/catalog/product/cache/982cff22d03368d7a9f3983da767218f/c/o/controlflex-coupling-cpfrg16-25-at.jpg

Anyone faced the same issue? Thank You.

4 Answers 4

0

Try by running resize command Manually

php bin/magento catalog:images:resize

Source: Mohit Kumar Arora Answer On Magento Stackexchange

5
  • Ensure you have writable permissions on this media/ folder. Change permissions to 777 recursively. OR This can happen if you change your Magento store from one server to another, you might have to change ownership of /media/ folder. Dec 6, 2022 at 6:45
  • @Waqar Ali I did try above resize command, not worked for me. Dec 6, 2022 at 18:07
  • @Oscprofessionals I have checked and confirm that media folder has right permission. Dec 6, 2022 at 18:08
  • @SureshChikani look for this image is the cache generated or not? local.projectsetup.com/media/catalog/product/cache/…
    – Waqar Ali
    Dec 7, 2022 at 8:18
  • Generated in the cache, generated path is different and product data images path different. @Waqar Ali Dec 7, 2022 at 19:12
0

https://stackoverflow.com/questions/74010191/magento-2-products-missing-from-category-pages-after-magento-2-4-5-update/74010192#74010192

This linked helped me with images not showing on category page.

0

If you are using the extension AbsoluteCommerce cache buster, make sure the override was not removing the code in the pub/media/.htaccess which you need to add according to the cache buster documentation.

0

Yes i am facing same issue no images are loading in front-end My magento version is 2.4.5

Can anyone help me out from this ??emphasized text

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.