enter image description here

Is anyone else having this issue, In visual swatch, I've uploaded transparent image and in frontend it showing like this? Magento ver. 2.1.3


I resolved by following


<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <preference for="Magento\Swatches\Helper\Media" type="Vendor\Module\Helper\Media" />


namespace Vendor\Module\Helper;

use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\App\Area;
use Magento\Catalog\Helper\Image;

class Media extends \Magento\Swatches\Helper\Media
    protected function setupImageProperties(\Magento\Framework\Image $image, $isSwatch = false)
        if ($isSwatch) {
        return $this;

Rest of the module files you've to create by yourself.

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.