Questions tagged [product-images]

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

Filter by
Sorted by
Tagged with
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
3 votes
2 answers
7k views

Magento 2: Save all product data outside Magento with Images

I have below code with Image Upload which is working fine. But images are not stored in Database Table as mentioned in Order. include('app/bootstrap.php'); use Magento\Framework\App\Bootstrap; $...
Jackson's user avatar
  • 9,889
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
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
25 votes
12 answers
124k 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
10 votes
3 answers
53k 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
  • 438
8 votes
2 answers
651 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
  • 250
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
6 votes
4 answers
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, ...
Thomas Domingues's user avatar
4 votes
2 answers
5k views

Configurable product image not switching with swatch change

I am trying to get configurable swatches working in a custom theme in a 1.9 build. I am basically using this method of importing the functionality in the theme. The swatches are working fine, they are ...
circlesix's user avatar
  • 4,273
4 votes
3 answers
6k views

How to Change Product Images with external Image url in all magento 2 frontend and Backend Image display?

I want to change Product Images to external Image URL in Magento 2 Frontend. Product Listing Page. Product Details Page Gallery. Related Products. Upsell Products listing. Cross Sell Listing. All ...
RAKESH ROY's user avatar
2 votes
3 answers
3k views

Magento 2 - GIF Images , Animation is not working on frontend

I am trying to upload .gif image for few products , image is uploading from admin panel successfully and animation also working in admin panel. But issue here is when i am checking this product on ...
Manthan Dave's user avatar
  • 9,806
2 votes
2 answers
5k views

Magento 2 and Animated GIFs as Product Images

Is there a way in Magento 2 to allow for animated gifs as product images? I can upload them to the backend without any issues, but when I view a product on the front-end it just shows them as ...
Ryan Skelton's user avatar
1 vote
1 answer
708 views

What is the use of Magento 2.2.6 product image cache?

I have some points regarding the Product Image Cache to discuss with you. I have created a product from the Magento admin panel. After creating the product, I have uploaded two of the product ...
Siva's user avatar
  • 1,120
1 vote
1 answer
10k views

How to resize image of product view page in Magento 2?

I want to resize product view gallery image. I want to resize main product image to 500X500 size? How can we achieve this?
Rahul's user avatar
  • 739
25 votes
7 answers
73k 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
  • 9,947
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
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
7 votes
9 answers
33k 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
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
5 votes
5 answers
8k views

magento 2 Uncaught TypeError: Argument 2 passed to Magento\Catalog\Block\Product\ImageFactory::getLabel() must be of the type string

In custom theme And category page show this error- Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Catalog\Block\Product\ImageFactory::getLabel() must be of the type string, null given, ...
sumeet bajaj's user avatar
  • 1,286
5 votes
7 answers
24k 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
5 votes
3 answers
7k views

magento 2 Default image file types not acceptable

I have an issue where I cannot add images to products on Magento 2.0.7. Attempts to do so with jpg, png, jpeg, and/or gif yield the following error: Attention We don't recognize or support this file ...
Qozmiq's user avatar
  • 131
4 votes
2 answers
9k views

Default uploading image size in Magento 2

I met one strange issue in Magento 2 - I’m trying to change default uploading image size from 800x1200 to 934x1400. I modified view.xml and now uploaded images going straight to folder media/catalog/...
Fred August's user avatar
3 votes
0 answers
585 views

When I deselect the swatch once after selected, the product image is not displaying in magento 2

When I deselect the swatch once after selected the product image went blank when I inspected and the image src went undefined in Magento 2.2??
Prathap Gunasekaran's user avatar
3 votes
5 answers
13k views

SSL Error - Invalid or self-signed certificate for non https configuration

After many hours of googling and experimenting I have no ideas what else could be wrong. When I try to upload product images I get: SSL Error: Invalid or self-signed certificate. It's only visible ...
Filip Górczyński's user avatar
2 votes
7 answers
10k views

MIME type not valid when uploading image using REST API

I'm trying to set a product image using the web api by POSTing to this url: http://my_magento_server/rest/V1/products/my-url-key/media With the following content: {"entry": { "media_type": "...
Michael's user avatar
  • 227
2 votes
1 answer
2k views

Magento 2.2.4 : Add custom checkbox in product image details in admin

I added the custom checkbox in product image details page. But, when I check it's not selected and not saved after saving records. I want to do like as Hide from Product Page checkbox working.
Emipro Technologies Pvt. Ltd.'s user avatar
1 vote
2 answers
547 views

Base image is blank

i hope someone can help me. Base image is not showing when I choose the product, but small and thumbnail works fine.This happened after I imported products again but with the Default attribute (I ...
Oscar Vazquez's user avatar
1 vote
1 answer
2k views

Images are not loading after upgrade to Magento 2.3.0

We have upgraded magento from 2.2.8 to 2.3.0 Upgrade is done correctly, But product images are not loading in list page and product detail page. Right now the product images are taking like below ...
Jafar Pinjar's user avatar
  • 1,929
1 vote
4 answers
1k views

Decrease the download size of an product image

you can use inspect element to see product image source and download the images . the sizes of image are more than 400 kb. I want to reduce the size of the image. media.phtml =http://pastebin.com/...
Baby in Magento's user avatar
0 votes
0 answers
350 views

Images not uploading

I tried to upload images for product but its not uploading and getting an like unable to list current working directory
Rajiv's user avatar
  • 179
0 votes
1 answer
3k views

Set product image size? [duplicate]

I got this method in my RelatedProduct class that gets related product image URL public function getProductImageUrl($product) { return $this->_storeManager->getStore() ->...
rits's user avatar
  • 753
0 votes
1 answer
795 views

With multi-store how do I ensure only one set of cache images are created?

In a multi-store Magento build each store view will have a corresponding cache folder in /media/catalog/product/cache, e.g. '1' for store '1'. In the website I am currently working on we have an ever-...
Henry's Cat's user avatar
  • 2,045
0 votes
1 answer
159 views

How to get all product images in modal slider?

<div class="pdp-media"> <a class="product-image" href="<?php echo $item->getProductUrl(); ?>"> <img src="<?php echo $this->helper('catalog/image')->init($...
onlyfordigitalworld's user avatar
0 votes
0 answers
49 views

Why Products Image Divided when i hover the images?

When i try to hover the products images its getting divided, how can i solve this error,
zus's user avatar
  • 155
0 votes
1 answer
999 views

How can I get the "exclude" product images in magento?

I want to display the "exclude" product images in a section on my product page. How can I do this?
Shafeeque S'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
9 votes
2 answers
29k 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
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
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
3 answers
21k 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
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
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
5 votes
6 answers
26k views

Magento 2 product images not showing, 2 different directories

Magento2 is looking directly in the root folder for media and static files. It is not looking in pub/media folder. Product images are not showing in the front. I installed Magento 2 in a subdirectory ...
Anita's user avatar
  • 51
5 votes
2 answers
11k 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 ...
andyjv's user avatar
  • 3,232
5 votes
7 answers
19k 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 ...
user2774042's user avatar