Questions tagged [product-images]

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

Filter by
Sorted by
Tagged with
17
votes
13answers
58k 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 - ...
3
votes
2answers
6k 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; $...
32
votes
3answers
62k 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
53k 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 ...
24
votes
3answers
15k 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
4answers
15k 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?
20
votes
10answers
81k 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->...
7
votes
7answers
14k 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 ...
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, ...
7
votes
9answers
26k 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 ...
2
votes
3answers
2k 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 ...
8
votes
2answers
619 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 ...
4
votes
2answers
4k 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 ...
3
votes
3answers
3k 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 ...
2
votes
2answers
4k 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 ...
1
vote
1answer
8k 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?
1
vote
1answer
458 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 ...
24
votes
6answers
51k 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 ...
8
votes
5answers
21k 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 ...
7
votes
3answers
34k 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 ?
2
votes
1answer
1k 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.
12
votes
3answers
9k 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/...
4
votes
2answers
8k 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/...
12
votes
3answers
6k 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 ...
6
votes
2answers
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 ...
3
votes
3answers
5k 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, ...
5
votes
6answers
18k 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.
4
votes
3answers
6k 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 ...
3
votes
5answers
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 ...
2
votes
5answers
7k 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": "...
1
vote
4answers
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/...
1
vote
2answers
236 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 ...
1
vote
1answer
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 ...
0
votes
1answer
934 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?
0
votes
1answer
2k 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() ->...
0
votes
1answer
742 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-...
0
votes
0answers
45 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,
0
votes
0answers
328 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
0
votes
1answer
131 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($...
18
votes
2answers
6k 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. "...
7
votes
1answer
4k 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($...
5
votes
7answers
18k 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 ...
9
votes
4answers
37k 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.
5
votes
1answer
5k 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%...
4
votes
2answers
8k views

Disable magento's compression of product images

I have created versions of my product images that look exactly how I want them to when viewed on the web. They are also at a size (weight) that I find acceptable. The problem is, once I upload to ...
3
votes
3answers
7k views

Magento 1 - programmatically add SEO to product image name

i have uploaded image in the admin to a product. Now I want the product image to be proper SEO name, basically like productname-sometags.png How can I do this? I have 1000 products on my site, it is ...
3
votes
1answer
4k views

Magento can't create cache product images!

Product cache folder is empty, seems like product images create failed. I have installed gd, and found logs below: 2014-12-04T01:22:17+00:00 ERR (3): Warning: call_user_func() expects parameter 1 to ...
2
votes
3answers
2k views

Magento2 - How do I add child item images to a grouped product - grouped.phtml

I am working on Magento 2 and would like to show images of the individual items that are part of a group. I have gotten as far as figuring out that it is grouped.phtml that renders the list of child ...
2
votes
3answers
2k views

Hide products without images (CE 1.9)

This question has been asked multiple times, but none of them have a clear solution and those few cases who should work (according to authors) are definitely not working properly in the current ...
1
vote
1answer
4k views

Get product image by its "Role" in the gallery

On the products grid in the category view I need to display additional image for some products. When I have a gallery of product images: $images = $product->getMediaGalleryImages(); foreach ($...