I've had mixed results with the method you have used
Instead I do this
public function __construct(
$this->galleryProcessor = $galleryProcessor;
Have you tried to change settings in "search Engine Optimization"?
You find it under Configuration > Catalog > Catalog > There you can choose the Canonical Link for Category and article. Maybe it help also for the images. The canonical tag for the url is a possibility for your problem.
getEnvironmentVariable() is returning null.
Either your credentials are being rejected or encrypted values that have previously been saved are not being interpreted.
Check your credentials. If correct raise with extension developer.
First, you load product using product id like
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->create('Magento\Catalog\Model\Product')->load($data->getProductId());
After that, get the URL of the image
$imageHelper = $objectManager->get('\Magento\Catalog\Helper\Image');
$image_url = $...
for this, you have to upload the image of the same dimensions for all products you want if you upload the image of different dimension it will create this issue. this issue can be solved by CSS but it is not recommended because some time image might get stretched out so the best solution is to upload the image of the same dimensions for all products
Most of the answers to this question are correct, but may partially not correct or incomplete if still you can not get the image to show on the Backend.
If you have tried any of these solutions and is not working try this:
1) Make sure you have got the files you want to load in your custom Module directory like this:
Please check your inspect element. Check the image path what does it display.
All product images are not display or only one or some particular product has problem ? Be sure with this first. If only one or particular product have problem than delete it and once again insert it. Because I hope you tried already all possible ways. Now this way will help you ...