Questions tagged [product-images]
Denotes questions related to product images configuration, management and modifications.
1,252
questions
1
vote
1
answer
215
views
Magento 2 set child product image from URL
Magento 2.3.5 How to set child product image from URL for configurable product on the product detail page
Example -
product URL is - http://xyx.com/product.html#447=5439
dropdown is selecting ...
1
vote
1
answer
2k
views
magento 2 Uncaught TypeError: Cannot read property 'data' of undefined [closed]
Magento 2.3.5 getting error on the product detail page of configurable product -
Getting this error -
Uncaught TypeError: Cannot read property 'data' of undefined
at Object.returnCurrentImages (...
0
votes
1
answer
393
views
How can I load image through api by using external image url?
I have my product images in my cloud store and those are public. I want to map those images to product through API. I have gone through the solution given in the below link. But I want to check if ...
1
vote
1
answer
785
views
Fotorama zoom_in and zoom_out buttons are not working in Magento 2.3.6
The zoom_in and zoom_out buttons are not working in the product pop-up gallery, however, while clicking the image, the image gets zoomed on the first double click and gets zoomed out on the second ...
0
votes
1
answer
229
views
Magento 2 - Fotorama Gallery Nav shaft is missing on product page
If you add multiple images to a product then they are showing below the base image in small boxes, see screenshot below (bottom corner - left):
This box is missing. First I thought it is because some ...
0
votes
2
answers
207
views
Assign images to products programmatically
I want to assign images to products in my store. The images name the same SKU product name.
I put my PHP file in root/pub and tried this code:
<?php
ini_set('display_errors', 1);
ini_set('...
0
votes
1
answer
57
views
How To change Product Detail Page Image Section Height In Magento2?
How Can I change Product Detail Page Image Section Height.
I Need To Decrease That Section Height.
i need to fixed this left column height as right column in magento 2 can any one help me how can i ...
0
votes
3
answers
67
views
Not able to get product image
How to get product image in "default.phtml" file ?
Magento2/vendor/magento/module-sales/view/frontend/templates/email/items/shipment/default.phtml
I am getting the shipped product object in ...
0
votes
1
answer
700
views
Product Images not showing - Magento 2
I am experiencing a strange issue with Magento 2 when creating new products where the product images shows fine in the backend, it also shows on the frontend category catalog but on the actual product ...
0
votes
1
answer
40
views
Image resize issue
I am uploading below image for the product via backend.
But it changes to below image
It is clearly visible that it changes the color. I have tried using ImageMagik also. I have even tried this ...
0
votes
0
answers
90
views
How to get image url in magento 2 on checkout page
How to get image url in magento 2 on checkout page custom phtml file.
I created the custom phtml. I need to get the product image in that phtml file
2
votes
0
answers
170
views
Resize different images to square without white space
I am trying to force all the images in the product grid to square. The database serves images from ultra wide to ultra high ratios.
i'm trying the following:
$productImage = $imagehelper->init($...
1
vote
2
answers
441
views
Magento 2 how to override theme-adminhtml-backend view.xml in custom module?
By default Magento 2 creates more than 20 duplicates of each product image..! (why???)
I have got this down to 5 using view.xml in my theme, but there is one extra set of image sizes I need to change, ...
0
votes
1
answer
844
views
Magento 2 set product image role programmatically
Hello and this is my code:
$imgURL = 'path/to/my/image.png';
$fileSystem = $objectManager->create('\Magento\Framework\Filesystem');
$mediaPath = $fileSystem->getDirectoryRead(\Magento\Framework\...
0
votes
1
answer
184
views
reindex command generates error: Argument 2 passed to Magento\Catalog\Block\Product\ImageFactory::getLabel()
When I run reindex command bin/magento index:reindex catalog_data_exporter_categories
I get the following error on console.
Argument 2 passed to Magento\Catalog\Block\Product\ImageFactory::getLabel()
...
0
votes
2
answers
990
views
Magento2 - How to get Image Size?
For Image optimisation, I want't to get Product Image Size. (Either in KB or MB etc.)
Ex: 6 KB, 6KB,5KB etc.
I am using following code on root path.
<?php
error_reporting(1);
ini_set('...
0
votes
1
answer
180
views
How does magento product image caching works?
I uploaded some images to my products and they were visible fine on frontend. I then went and deleted those images from pub/media/catalog/product folder and also deleted pub/media/catalog/product/...
3
votes
1
answer
323
views
Magento 2 : Custom API code to upload multiple product images programmatically
I am making custom Magento API to create products. I can make products using custom API.
Now my requirements is to upload multiple images to that API.
Can anyone helps me for reference code to upload ...
0
votes
1
answer
123
views
Data migration issue : SQLSTATE[23000]: Integrity constraint violation from maento 1.9 to magento 2.4.1
I am migrating the data from Magento 1 to magento 2.4.1 by running the following command
php bin/magento migrate:data --reset
vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.0.1/...
0
votes
1
answer
110
views
How to migrate product images before using Data Migaration tool from magento 1 to magento 2
I wish to migrate data from magento 1 to magento 2 using data migration tool.
I know the procedure for migration using data migration tool.
But i am having doubt on, how to migrate the product images &...
3
votes
1
answer
3k
views
Magento 2 - get cache url of media gallery images of product
This is my code for get cache url of images:
$images = $_product->getMediaGalleryImages();
foreach($images as $child){
echo '"'.$child->getUrl().'"';
}
Result expected: ...
0
votes
1
answer
71
views
Magento Command for bulk Optimizing existing Product images
How to optimize existing Product images via commandline, similar to resize command.
php bin/magento catalog:images:resize
https://docs.magento.com/user-guide/catalog/product-image-resizing.html
This ...
0
votes
1
answer
557
views
Importing images with special characters in path
I am trying to import a lot of images. Images for each product are placed in subfolders by product IDs and locale.
The problem is that each locale specific folder name starts with a caret (^).
Example ...
0
votes
0
answers
36
views
How to increase the quality of product images JPG Magento 2.3.4?
I'm using Magento 2.3.4. my uploaded product images quantity is very low because of compression. My product images size in 30 to 40 kbs, can someone help me increase images quantity?
1
vote
1
answer
71
views
Change product image size for virtual products only
Is it possible to change the product image size for virtual products only? I'm aware of the view.xml file to change image resolution, but it changes the product image size for all product types. Maybe ...
0
votes
1
answer
37
views
Import all Products from magento 1.9 to magento 1.9
I am using magento 1.9.4 . I want to import all Product data from another magento 1.9 store. i tried via .csv file but it did not worked. How can i transfer product from one store to another with all ...
0
votes
1
answer
74
views
Magento 2 Image Gallery pure SQL Manipulation
I've written an interface for Magento 2 admin that allows creation and editing of key product attributes from a phone.
Once a product is created and it's images attached to the product, I have been ...
2
votes
1
answer
156
views
Magento 2 : Image is not showing on product detail page after few seconds
Product image is not showing after few seconds on product detail page. When page loads it showing the image but after few seconds it's vanishing.
Please provide any solution you have.
Thanks in ...
0
votes
2
answers
2k
views
Failed to Load Resource. Server Responded with a 404 on certain Products Images showing NULL!
I found this problem on our production site. Where any Config products that have a picture assigned to the config product with out of stock options return the image null when looking at the Product ...
1
vote
0
answers
208
views
Product view page: Error on Display Product Images per Selected color
Beginner on Magento 2, i'm creating a Product view Page, and i'm having Problems to DISPLAY the Product Images, i just want to Display the images of the SELECTED COLOR, but it ONLY SHOWS the ...
0
votes
1
answer
203
views
Magento 2 Products Base Image Missing on Frontend after Import
We've been having an issue with importing images via CSV spreadsheet into Magento 2.
I'm able to import product images into the Magento admin via the columns Base Image, Small Image, Thumbnail and ...
1
vote
2
answers
110
views
Product images not showing
I'm experiencing a strange behaviour: all the product images are present if I edit a product on the backend. But if I visit the product list in the backend or frontend, or the product view in frontend,...
3
votes
0
answers
351
views
Assign Image Role to Multiple Products Images
I have added image role by using this code
namespace Vendor\Module\Setup;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use ...
1
vote
1
answer
366
views
Change the default product image import directory
Dears,
In magento 2.3.5, in order to add images within the product import csv, the images should be in:
var/import/images
While in the pass, the path was:
pub/media/images
My question is, is there ...
2
votes
2
answers
201
views
Product Images are all different sizes? How to fix
My product images or certain pages are all different sizes. Anyone know why? Image below.
0
votes
1
answer
928
views
Magento 2.4 with luma showing correct placeholder instead of small_image
I am workin in a magento 2.4 with luma as a vendor so the list.phtml come directly untouched from the core of magento.
I can see the images in the admin and in the product view gallery but at the ...
0
votes
1
answer
484
views
Magento 2: Right folder to upload images
I'm having product listing in CSV file. Please let me know right folder to upload product images.
0
votes
0
answers
81
views
Magento 2 - Update Images
I'm updating the images of my products. I'm using Import menu to do it.
I would need to replace the old image by the new. The new image is indicate in a csv file by product sku. The name of the images ...
0
votes
1
answer
254
views
CLI Resize ends with "Killed"
I'm trying to resize all the images in my 2.3.4 Magento database. I have about 100 images to resize.
When I run the command line instruction, bin/magento catalog:images:resize , it comes back with a ...
1
vote
1
answer
473
views
Magento 2: Cart product image shows 404 error in new products
I have uploaded some new products to my store, and when I add some of the new product to the cart, the images are not seen:
And this happens because the image are not generated in pub/media/catalog/...
0
votes
0
answers
84
views
Product Image background color goes to tranparent in Magento 2?
My original png image for product is
After upload the image the image show on Front end like
It shows like that why my background colour fade out.
Any help is appreciated.
1
vote
0
answers
69
views
Get images by selected color on Product View page
I want to get the Images Array from the specific color that the client Selects in the PRODUCT VIEW PAGE.
So i found something on
templates/product/view/gallery.phtml
I found $block->...
0
votes
1
answer
312
views
Product catalog images in product page goes missing as soon as Flush Catalog Image Cache
On certain images my end user complained that the images in product detail page are missing for certain products. So, I tried to reproduce the issue. I deleted all the images from one of the product ...
0
votes
1
answer
84
views
how get image from external source url in detail page
I'm using magento 2.3,
I need to use external link for img not uploaded in magento end for product Detail page
0
votes
1
answer
820
views
Magento 2 - Update all images of the products
0
I would like to update ALL images of my products catalog.
The folder .../pub/media/catalog/product has the images of the products inside a folders with letters of alphabet of numbers:
If I inspect ...
1
vote
1
answer
333
views
Magento2.3.3 - Loading first product image if no base, small or thumbnail image is set?
How can I get the first product image of a product, If none of the products images are set as base, small or thumbnail image?
In all the examples I found based on getting base, small or thumbnail ...
0
votes
0
answers
85
views
How to create dynamic product image in Magento 2 on creating Product?
I have created a module to create simple product in Magento 2.
I want to create dynamic image for product with product name and save that image as product image.
How would i do that ?
Any Help is ...
0
votes
1
answer
100
views
Transposed images (white with black background)
My developer is in the middle of upgrading my site from M1 to M2 2.3.2. Some of the product images that should have a white back ground now have a black background. My developer says it's because M2 ...
0
votes
1
answer
206
views
Thumbnail images are not loading Magento 2.3.0
On Category Listing Page my Product Thumbnail Images are not Loading whenever I apply a Filter on to the Category Page or I try to Navigate to some other pages of the Category. The first page of the ...
1
vote
1
answer
114
views
Wrong product image in sales order email in production mode - Magento2.3.5
We use the following code to load the product image in the sales order email.
This works perfect in developer mode, but when we switch to production mode the images are not correct for those who do ...