Skip to main content

Questions tagged [product-images]

Denotes questions related to product images configuration, management and modifications.

Filter by
Sorted by
Tagged with
32 votes
3 answers
68k views

How can I change the default product images sizes on Magento 2?

In magento 1.x.x, we could change default thumbnail images in admin : System > Configuration > Catalog But in magento 2.0, how can I change theses value I can not seem to find any configs to allow ...
Dynomite's user avatar
  • 632
26 votes
12 answers
128k views

How to get product image and URL in Magento 2?

This is my observer: public function execute(\Magento\Framework\Event\Observer $observer) { $orderIds = $observer->getEvent()->getOrderIds(); $order = $this->...
Ramkishan Suthar's user avatar
25 votes
7 answers
75k views

Regenerate catalog cache images issues

I'm doing the migration process from Magento 1.9.2.4 to Magento 2.1.6, after migration completed, I move the media folder of M1 to pub/media M2. Now the problem is some of the images don't generate in ...
Bilal Usean's user avatar
24 votes
3 answers
16k views

Faster way to load media images in a product collection

TL;DR: How do I load the product images/gallery without loading the whole product? I want to load the images on a product. What I do in the .phtml $_popularCollection = $this->...
janw's user avatar
  • 980
24 votes
3 answers
54k views

Change product image for configurable products

I was looking for a way that let me change the product image based on the attribute selected for the configurable product. e.g. Configurable Product With Color Options : 1) Red 2) Green If the Red ...
Ravi Soni's user avatar
  • 1,515
19 votes
4 answers
18k views

How to increase the quality of product photos JPG (Magento 2)

The JPG compression on Magento 2 is very strong, so that the quality of product images get really bad in Catalog and Product view. How can I change the Image compression for JPG's in Magento 2?
Oliver Schmid's user avatar
18 votes
2 answers
7k views

Magento 2: best practice to add/delete product Images programmatically?

I want to upload images to the existing products. The images are in import_dir. And they need to be added to the product that already exists in the catalog. I could find only 2 ways how to do it. 1. "...
Olga Zhe's user avatar
  • 321
17 votes
13 answers
59k views

Magento 1.9 - No upload image buttons

I am building my first Magento store, but I found out that I can't add images to products. It is testing site, so I am learning how things are functioning in Magento. I tried almost everything - ...
user20713's user avatar
  • 171
14 votes
3 answers
16k views

How can we load product image gallery instantly without the delay in magento?

this is my first question bare with me :) Problem: The fotorama gallery used in Magento 2 makes the user experience sluggish. It does not matter how fast my cached static Magento 2 runs if the product ...
Fancyman's user avatar
  • 509
13 votes
3 answers
9k views

How to delete unused images from my media folder?

I have more than 50,000 images in pub/media of products. But there are so many unused images so I want to remove all images which are not associated with any product. For Magento 1.9.x this can be a ...
Ronak Chauhan's user avatar
13 votes
3 answers
12k views

Magento 2 Rest Api get Thumbnail Image url

How do we get the url to thumbnail image of of a product through rest API. /V1/products/{sku}/media would get us the relative url such as "/m/b/mb01-blue-0.jpg" and the image url would be baseurl/...
Mohammed Shameem's user avatar
10 votes
3 answers
55k views

What does catalog:images:resize do in magento 2?

I am having a problem with how my images are displaying on my Magento 2 store. And also I would like to know: What does catalog:images:resize in Magento 2.x version ?
Jiyaad.D's user avatar
  • 448
9 votes
8 answers
37k views

Magento 2 Get all product images in on product list page

In Magento 1 I've always used $_product->getMediaGallery('images') But in the source from Magento 2 I see $productImage = $block->getImage($_product, $image); echo $productImage->toHtml(); ...
Xaiamedia's user avatar
  • 351
9 votes
4 answers
39k views

How to import product images in bulk into Magento 2?

I'm moving my store from ver 1.7.2 to 2.0.2. Since I have less than 200 products I will export/import them using CSV files, however I'd like to know how to import product images.
Luis Garcia's user avatar
  • 1,639
9 votes
3 answers
15k views

Getting a custom attribute image

Magento 2 question here: I've made a custom attribute (media type) with the name of 'bike_range_image', and tried googling and searching in the core and everything I could to get the image with a ...
TommyK's user avatar
  • 109
9 votes
2 answers
2k views

Hide small images on frontend Magento 2

I have Magento 2 and want to hide small images of the product that is added from the admin on frontend. I have hidden the small image attribute from admin but want to hide it from front-end as well.
A.Srivastava's user avatar
9 votes
3 answers
30k views

how to get product thumbnail and product url in order confirmation email

I have tried already mentioned solution for getting product thumbnail image along with product url (link to product)using below solution /vendor/magento/module-sales/view/frontend/templates/order/...
Yogesh Raghav's user avatar
9 votes
4 answers
5k views

Magento 2 is there a faster way to change product media gallery entries programmatically

I need to do a massive update of product data but what I need to do can't be achieved with product import. In example I need to update media gallery and categories for given products, but the solution ...
CaNNaDaRk's user avatar
  • 191
8 votes
7 answers
22k views

how to get all images of a particular product

How to get all images of a particular product by using this code i am able to fetch only single image of the particular product.. Please help i am new to this. <?php // Get products in category ...
Prashant Das's user avatar
8 votes
7 answers
20k views

How to change div fotorama__stage height on product view page

How can I change height in the below code on Product detail page <div class="fotorama__stage" data-fotorama-stage="fotorama__stage" style="width: 462px; height: 372px;"> I have tried below ...
Anshu Mishra's user avatar
  • 8,990
8 votes
5 answers
22k views

Magento Delete all Product Images

I have a magento Installation which has had several image imports done by the client and its got wrong images in the wrong products, toasters with fridge freezers as the initial import had the wrong ...
Andy Simpson's user avatar
8 votes
7 answers
15k views

Delete Unused Catalog Product Images

I have taken over a magento store that over 3 years has built up a large amount of product images that are no longer in use but were never deleted. Is there a way i can delete all images that are no ...
odd_duck's user avatar
  • 1,396
8 votes
5 answers
21k views

Magento2 : get image path of product

I created custom page for getting products . I got all information but how to get full image path. I am using getImage() it is showing image only how to get full path. <a href="<?php ...
User0434's user avatar
  • 1,155
8 votes
2 answers
652 views

Unable to see the actual images in the back end

Magento 1.9.1 Porto theme We had to have our hosting company do a full restore. Now most things work except for when going into the images tab in the Admin panel: it shows the BROWSE FILES and ...
Allysin's user avatar
  • 260
7 votes
10 answers
34k views

Magento 2 can not upload product images

Any time I try to add images to a product in Magento 2.1 I get the following error: Attention: We don't recognize or support this file extension type. It does not matter what type of image I ...
Blizzardengle's user avatar
7 votes
3 answers
22k views

How to add product image when creating via rest api?

This is how I creating product. { "product": { "attribute_set_id": 4, "type_id": "simple", "sku": "B201-SKU", "name": "B201", "price": 25, "status": 1, "...
user avatar
7 votes
1 answer
6k views

how to add an image programmatically from any url in Magento 2?

I try this code but if the image doesn't exist in this path pub/media/catalog/product; it doesn't work. I want to add an image from any url; any ideas for that ? for ($i = 0; $i < count($...
Jack's user avatar
  • 71
7 votes
2 answers
3k views

Get product baseimage without product object

How can i get the product base-image without loading the whole product object ? I have product-id,sku.[I know we can get product base image from product object] Is there any best method or trick ...
Keyur Shah's user avatar
  • 18.1k
7 votes
2 answers
2k views

SQL error when programmatically adding image to product

I am updating products programmatically and then adding images to them via $product->addImageToMediaGallery($file, array( < flags > ), true, false); For some products, this works just fine, for ...
Yorrd's user avatar
  • 828
7 votes
1 answer
4k views

Show different thumbnail image set for each color picked in configurable product

Hi everybody (first post here), I've been trying Magento 1.9 display a different set of thumbnail images for every option in the color swatch, in a configurable product, but with no success. For ...
abiyi's user avatar
  • 217
7 votes
1 answer
1k views

Watermark Category Images with Brand Logo

I'd like to add a watermark to each small image (but only in the category listing page) that is based on the manufacturer attribute. I don't want to alter the small image for that product on other ...
iJeep's user avatar
  • 621
7 votes
3 answers
3k views

Product image not zooming in properly when hovering on image at product detail page

In my product page detail when i try to hover the product image there's only white box with low opacity overlaying at the top of my image like this : Usually in Magento 2, when hovering the image it ...
Shell Suite's user avatar
  • 1,702
6 votes
8 answers
17k views

The image cannot be removed as it has been assigned to the other image role?

I am using Magento 2.1.4 unable to remove the image while removing it noticing "The image cannot be removed as it has been assigned to the other image role". How can I overcome this? I have ...
Nagaraju Kasa's user avatar
6 votes
7 answers
25k views

Magento2: How to remove product images programmatically?

During edit product from front-end I need to remove images of the product gallery which are checked by the user to remove it.
Ranjeet Singh's user avatar
6 votes
3 answers
2k views

imagecolorsforindex(): Argument #2 ($color) is out of range when running bin/magento catalog:images:resize

I recently upgraded from 2.4.4 to 2.4.5. While placing the images in pub/media folder and running bin/magento catalog:images:resize, I am getting the following error imagecolorsforindex(): Argument #2 ...
Rejith's user avatar
  • 341
6 votes
4 answers
4k views

Undefined index "media_type" while adding image to product's media gallery

Here is the code snippet I use to add an image in a product's media gallery : $sku = 'product-example-sku'; $image_url = 'http://example.com/image.jpg'; $image_ext = pathinfo($image_url, ...
Thomas Domingues's user avatar
6 votes
2 answers
4k views

Magento2 : Manage and understand images of deleted products behavior?

I'm trying to understand how M2 handle images of deleted products. If I delete a product (by admin or import/delete), all associated images in the media/catalog/product folder are still here. In M1 ...
cap340's user avatar
  • 711
6 votes
2 answers
700 views

Excluding product images progamatically

How do you exclude all product images of a product, i.e. the Exclude box of every image being ticked on the Images tab in the Magento backend. I'm bulk adding new images to products using $product-&...
SuperDicq's user avatar
  • 175
6 votes
1 answer
6k views

Get multiple product images using REST API

I'm requesting products list using the following API call GET /V1/products http://127.0.0.1/magento2github/index.php/rest/default/V1/products?searchCriteria%5BpageSize%5D=100000&searchCriteria%...
emp's user avatar
  • 304
6 votes
2 answers
2k views

Uploaded images not appearing on frontend and backend with a Broken image symbol

I have uploaded images to products. It has been viewed then in backend and frontend it is not appearing. I have checked with stackoverflow answers like Products do not show up in front end and ...
phoenixmagento's user avatar
6 votes
2 answers
17k views

Magento : Product Images and browse and Upload button Missing

I have no solutions found since last one week. In My magento 1.9.3.1 all product images and browse file button and upload files button are missing on product edit in admin show in screen-sort. kindly ...
Pankaj's user avatar
  • 69
6 votes
2 answers
1k views

Product collection by non-existing images

I want to create a collection of all the products without a image and set them do the status "disabled". Because i use a automatic import script there are some products that HAD images before, but ...
RoRo's user avatar
  • 143
6 votes
4 answers
5k views

Get Magento second image in product view page

I want to display image 2 from a product in the product view page next to the description. I need some help putting this code together. I found some code online, but it gives me image 1 (base image). ...
Rudy's user avatar
  • 73
6 votes
2 answers
4k views

Control placeholder image width/height in magento 2

I can control the product images width/height in view.xml located in app/design/<vendor>/<theme>/etc in product list page. Some of the products not having images so it tries to show ...
saravanavelu's user avatar
  • 3,951
6 votes
1 answer
2k views

How to solve CRITICAL error of getimagesize() after data migration in Magento2.2.0?

After data migration process in Magento2.2.0, When I open category page at frontend than I get this type of error in system.log file, [2018-01-02 11:56:58] main.CRITICAL: Warning: getimagesize(/...
Dhaduk Mitesh's user avatar
6 votes
1 answer
4k views

Magento 2 > Images Background Color do not apply

On Magento 2.0.2 I edited my custom theme view.xml (app/design/frontend/XXXXX/default/etc/view.xml) and added 2 properties for each images type : transparency and background. My file now looks like ...
Dynomite's user avatar
  • 632
6 votes
1 answer
5k views

Magento 2 replace product images via CSV import

I'm following this tutorial http://docs.magento.com/m2/ce/user_guide/system/data-import-product-images.html to upload and assign images to product. I have successfully completed this process but i ...
Aniruddha A Deshpande's user avatar
6 votes
2 answers
2k views

How can I remove the white borders from images? Magento 2.1

All my images appear like this. <image id="category_page_grid" type="small_image"> <width>240</width> <height>300</height> </image> <image id="...
Azul_Falcone's user avatar
6 votes
2 answers
4k views

Magento2.3.1: Images not displaying

Images are not displaying in magento2.3.1. https://www.depoto.com/test-product.html I gave the permissions for media folder 777 already. We are not using any extension which relates to the product ...
nukala satish's user avatar
6 votes
0 answers
2k views

How do I add Product Images as URL instead of uploading them in Magento?

I am making a fashion store in Magento. I have affiliation with many stores and I don't want to save their product images on my server because of space issue, they require a lots of space more than 30 ...
PawanKaushik's user avatar

1
2 3 4 5
26