I have use this code in magento 2
$media_url = $storeObj->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
$baseimage = $media_url.'catalog/product' . $_product->getImage();
Output: http://localhost/smithbuy/pub/media/catalog/product/w/d/wd7500aaks.jpg
But, I want
http://localhost/smithbuy/pub/media/catalog/product/cache/1/image/700x700/e9c3970ab036de70892d86c6d221abfe/w/d/wd7500aaks.jpg
Please help me.
Use the following code to avail the thumbnail image in the Magento:
getTypes() returns an array that may contain the following vlaues:
If it contains thumbnail then it's the thumbnail image.