Unterminated RegEx at byte 182: thumbnail url magento 2 code example
Example: magento 2 get product image
//todo get product object $product
$objectManager =\Magento\Framework\App\ObjectManager::getInstance();
$helperImport = $objectManager->get('\Magento\Catalog\Helper\Image');
$imageUrl = $helperImport->init($product, 'product_page_image_small')
->setImageFile($product->getSmallImage()) // image,small_image,thumbnail
->resize(380)
->getUrl();
echo $imageUrl;