I have this code to show big image

$productImageUrl = $block->getUrl('pub/media/catalog').'product'.$_product->getImage();

but how i can call URL for small img of product


If you are getting your $_product object correctly then you can call below code to get Small Product Image.

  • they give me the same picture for product
    – Barboud
    Sep 13 '17 at 13:52
  • print $_product object for small, thumbnail image URL and check that image inside pub/media/catalog/product folder. Also check that you have assigned correct image for that product. Sep 13 '17 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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