New answers tagged

0

if you don't want to run commands than you can also regenerate images programatically just add below code in top of the file vendor\magento\module-catalog\view\frontend\templates\product\view\gallary.phtml $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $resizeImage = $objectManager->get('\Magento\MediaStorage\Service\ImageResize');...


0

phtml File <?php $ProductImageUrl = $block->getUrl('pub/media/catalog').'product'.$product->getData('thumbnail'); ?> <a class="productlinks" href="#" title=""><img src="<?php echo $ProductImageUrl; ?>" width="210" height="210"> </a>


2

Go to admin Email template: Marketing -> Communications -> Email Templates & open email template Ex. New Order <div class="order-info" style="background: url({{view url='images/order-info.png'}}) center center no-repeat;"> Image folder path will be: app/design/frontend/Vendor_Name/Theme_Name/web/images I hope it will be ...


1

Please check If there is any other module is overriding the class by preference.For which you want to add your plugin. Check if its in developer mode. Remove the generated/code/ and flush cache Make sure Module is available in Config.php


1

You're forgot to pass argument in aroundCreate() and proceed() method. Just use this below code and check log file. <?php namespace Vendor\Module\Plugin\Block\Catalog\Product; use Magento\Catalog\Model\Product; class ImageBuilder { public function aroundCreate( \Magento\Catalog\Block\Product\ImageBuilder $subject, \Closure $proceed,...


0

Use Magento\Catalog\Helper\Image in your block to get the thumbnail image of product public function getImageUrl($product) { $this->imageHelper->init($product, 'product_thumbnail_image')->getUrl(); }


0

1.add below in phtml file, it is based on the \Magento\Catalog\Block\Product\ListProduct $imageDisplayArea = 'your_custom_img_id'; $productImage = $block->getImage($product, $imageDisplayArea); //$position = 'left:' . $productImage->getWidth() . 'px;'. 'top:' . $productImage->getHeight() . 'px;'; <a href="<?= $escaper->escapeUrl($...


Top 50 recent answers are included