Questions tagged [product-images]

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

Filter by
Sorted by
Tagged with
23
votes
3answers
51k 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 ...
23
votes
3answers
39k 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 ...
23
votes
3answers
13k 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->...
18
votes
2answers
18k views

Regenerate catalog cache images issues

I'm doing migration process from Magento 1.9.2.4 to Magento 2.1.6, after migration completed, I move media folder of M1 to pub/media M2. Now the problem is some of the images doesn't generate in ...
18
votes
3answers
9k 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?
18
votes
2answers
4k 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. "...
16
votes
13answers
53k 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 - ...
12
votes
3answers
5k 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/...
10
votes
2answers
8k views

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

this is my first quesiton 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 ...
9
votes
1answer
2k views

Magento 2, How to delete unused images using php script

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 ...
8
votes
7answers
15k 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 ...
8
votes
7answers
20k 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(); ...
8
votes
2answers
570 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.
8
votes
5answers
19k 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 ...
8
votes
4answers
10k 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 ...
8
votes
2answers
565 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 ...
8
votes
2answers
1k 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 ...
7
votes
3answers
25k 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.
7
votes
3answers
8k 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 ...
7
votes
6answers
11k 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 ...
7
votes
2answers
2k 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 ...
7
votes
2answers
1k 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 ...
7
votes
1answer
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 ...
6
votes
7answers
14k 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 ...
6
votes
4answers
3k 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, ...
6
votes
2answers
279 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-&...
6
votes
2answers
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 ...
6
votes
2answers
15k 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 ...
6
votes
2answers
673 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 ...
6
votes
4answers
4k 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). ...
6
votes
1answer
550 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(/...
6
votes
1answer
2k 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 ...
6
votes
0answers
1k 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 ...
6
votes
1answer
753 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 ...
5
votes
7answers
17k views

Can't see product images in admin, also missing Browse Files and Upload Files

I can see all product images at the store level, but can NOT see any images in the admin area! Furthermore when I create a new product under admin, the "Browse Files..." and "Upload Files..." buttons ...
5
votes
2answers
8k views

Product Image does not load on product page

I am having an issue with products images in Magento 2. The products were brought in from a Magento 1.7 install using the data migration tool. I then copied the media/catalog folder from the M1 ...
5
votes
1answer
518 views

Some very few images are rendered with inverted colors by Magento

We have the problem, that one image in the catalog is shown negatively in Magento below the gallery: Original I tried to reproduce with n98-magerun2 dev:console $i = $di->create('\Magento\...
5
votes
1answer
874 views

Image sizes in detail page

In my product detail page, fotorama slider images are not the size I expected. I tried using view.xml inside my theme and tried using fallback view.xml. I'm using Blank theme as parent. I need to ...
5
votes
2answers
2k views

Access product-images from external url

I need to display images for products without uploading on my server. I need to achieve: Images are uploaded on another server Images to be display on magento2 products Is it possible that we add ...
5
votes
2answers
2k views

Images uploaded but not saved

When I'm trying to edit a product(the product already has an image) and add another image, the image is uploaded correctly in the /media/catalog/.. directory. The image is displayed correctly in the ...
5
votes
2answers
2k views

Magento 2: Getting “Warning: getimagesize(): Filename cannot be empty” after switching to a new empty theme with no parent

I wanted to start building a theme from scratch & my first step was to create a new theme with "Blank" as a parent. I then browsed a few pages & saw that everything works just fine. On the ...
5
votes
1answer
284 views

Product Images in Magento 2

Is it possible to not have the images popping out of their frame and filling the whole page when I click on them? I would like nothing at all to happen when you click on the image in the product page.
5
votes
2answers
2k 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 ...
5
votes
1answer
583 views

Define new product image attributes

For a new fashion project we want to define a new product image attribute (color_swatch or pattern). We can't use the standard color swatch functionality, because for fashion products the color swatch ...
5
votes
1answer
1k views

Magento 2 - Product images from custom block

I have 2 custom blocks, one is loading a product collection from category ID and another one loading a single product from product ID. My blocks extends the core Magento product list block (\Magento\...
5
votes
1answer
2k 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 ...
5
votes
1answer
1k 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 ...
5
votes
1answer
1k views

All product images missing from admin but show in DB and front end

Using Magento v1.9.2.2 with patches SUPEE-7405 v1, SUPEE-7405 v1.1, SUPEE-8788, SUPEE-9652. Browsers: Safari & Chrome on Mac OSX. I'm having an issue where none of the images in the product admin ...
5
votes
1answer
886 views

Magento 2 : Display grouped product pictures in template

I am trying to display the grouped product images on my product page. So I extended the grouped.phtml file in my theme and modified it as follow: <?php /** * Copyright © 2016 Magento. All rights ...
5
votes
0answers
543 views

All product images need to be defined in view.xml?

In Magento 2, the image sizes are defined in theme's view.xml file, e.g. in Luma theme: /app/design/frontend/Magento/luma/etc/view.xml: <image id="category_page_grid" type="small_image"> &...