51 votes
Accepted

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

Magento uses the file called view.xml which is maintained at the theme level of the application. So for example, if you are using the default theme luma you should find the view.xml under vendor/...
user avatar
13 votes
Accepted

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

Here's a simple solution that will cause the product's base image to be displayed while the JS is loading. Create the following file in your theme: {theme_dir}/Magento_Catalog/templates/product/view/...
user avatar
  • 8,819
7 votes
Accepted

Magento 2 get gallery images

override the below template for getting gallery images url in product detail page app/design/frontend/Vendor/ThemeName/Magento_Catalog/templates/product/view/gallery.phtml <?php /* @...
user avatar
  • 9,549
6 votes

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

Magento product uses the file view.xml for image size dimensions at path vendor/magento/theme-frontend-luma/etc/view.xml Here you will find node inside the node. Copy the file view.xml and put it ...
user avatar
5 votes
Accepted

Magento 2 Bundle product options images

Try this code: First you need to override below file. After that you can get bundle option images from below code. app/design/frontend/Vendor/Theme_Name/Magento_Bundle/templates/catalog/product/...
user avatar
4 votes
Accepted

magento2: how to use product uploader in custom module

In layout made following changes <referenceContainer name="content"> <uiComponent name="test_form"/> <referenceContainer name="test_form"> <block name="gallery" ...
user avatar
3 votes

Magento 2 : How to override fotorama.js in magento custom theme

Actually i was able to customize fotorama library downloaded from their official website because I found it difficult and nearly impossible to use Magento's fotorama library, below are the steps I ...
user avatar
3 votes

How to display product image slider's arrow if image count is greater than 4?

Override template file of gallery in your own theme, copy vendor/magento/module-catalog/view/frontend/templates/product/view/gallery.phtml to your_theme_root/Magento_Catalog/templates/product/...
user avatar
3 votes
Accepted

Magento 2 : How reduce size of fotoroma gallery icons on product detail page

The icons actually come by cropping a weird background which contain all the icons, located here - pub/static/frontend/Magento/luma/en_US/mage/gallery/gallery.png so you will have to adjust background-...
user avatar
  • 4,585
3 votes

Magento 2 : How to override fotorama.js in magento custom theme

I got the solution after some R&D on fotorama.js I override the file of fotorama.js in My_Theme. app/design/[My]/[Theme]/web/fotorama/fotorama.js I want to Enable both gallery nav arrow and don'...
user avatar
  • 1,125
3 votes
Accepted

move left product gallery on product page

You can follow this link magento 2.2.2 - How to transfer the product thumbnail to the left side Modify your theme view.xml file <vars module="Magento_Catalog"> <var name="...
user avatar
2 votes

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

Aaron Allen's answer was great and i used it to figure out how to do it for my custom setup. All i had to do was add the image with some inline css and add padding-bottom: 100% to the loading-mask. ...
user avatar
2 votes

Magento 2 get gallery images

Try bellow code for display product images on product detail page. Add code to gallary.phtml <?php foreach($block->getGalleryImages() as $image){ ?> <?php if(!$block->isMainImage($...
user avatar
2 votes

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

You can also specify image dimensions directly in template file like this: <?php /** * @var $block \Magento\Catalog\Block\Product\Widget\NewWidget */ $image = 'new_products_content_widget_grid'; $...
user avatar
2 votes

Magento 2 : How to make product image zoom on mouse over

You can enable on view.xml app/design/frontend/Package/theme/etc/view.xml <var name="magnifier"> <var name="fullscreenzoom">20</var> <!-- Zoom for fullscreen (integer)...
user avatar
  • 535
2 votes
Accepted

Magento 2 override /lib html file

I think you missed something with clearing cache. Copy file to /app/design/frontend/<vendor>/<theme>/web/mage/gallery/gallery.html Clear cache and delete pub/static/frontend Deploy ...
user avatar
  • 1,668
2 votes
Accepted

Where are media attributes/roles stored?

The 'roles' are specific attributes: image (for Base role), small_image (for Small), swatch_image (for Swatch) and thumbnail. You can find the IDs of these attributes by checking the eav_attribute ...
user avatar
  • 4,733
1 vote
Accepted

Product Gallery Image Upload Issue in Magento 2.1.4

This may help you: Check your /tmp dir space Check it's permission
user avatar
  • 1,705
1 vote

Product Gallery Image Upload Issue in Magento 2.1.4

In following thread, you can find other possible reasons and its solution. Magento 2 can not upload product images Hope it helps.
user avatar
1 vote

Magento 2 Product base image and thumbnail images are not showing!

Simply go to product edit page and resave. Is it showing now? so you need: php bin/magento catalog:image:resize Also: Any errors in browser console? or system.log and exception.log?
user avatar
  • 1,668
1 vote
Accepted

How to stop magento to generate all types of images in cache on page visit

After debugging, we found that Magento internally calls various types of images in different files and they are generated. We have implemented a workaround in the following way. override all the ...
user avatar
  • 576
1 vote
Accepted

magento 2: Product Page gallery.js issue

fullscreen should be an object, since you have set it to a boolean value, it is giving error. Try setting like this: "fullscreen": {},
user avatar
1 vote

Magento 2 : How to override fotorama.js in magento custom theme

So in order to have the arrows always active on main fotorama image, just edit the line 16 in app/design/{vendor}/{Theme}/web/fotorama/fotorama.js //wrapNoControlsClass = wrapClass + '--no-controls', ...
user avatar
1 vote

Magento 2 : How to override fotorama.js in magento custom theme

You will have to write custom js for it as fotorama by default don't provide functionality to always show arrrows I tried in gallery.phtml variable arrows="always", but its not working. arrows ...
user avatar
  • 4,585
1 vote
Accepted

How to Display 5 images by default in magento 2 product gallery vertical

You can place the file view.xml in your theme's /etc directory with contents like this: <view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
user avatar
  • 1,125
1 vote

Magento2 remove slider of gallery images on product detail page

I've used "MSP_LightGallery" Ext. which is available on GitHub.you can download here and modify according to your requirement:- https://github.com/magespecialist/m2_MSP_LightGallery Thanks!!!
user avatar
1 vote
Accepted

Magento 2 : When you upload a thumbnail or category image in Magento 2 where does it go?

All the images you normally upload go (and should go ,in case of custom modules too) in pub/media . Thumbnails usually go in pub/media/catalog/product/{product-specific-url} , similarily the category ...
user avatar
  • 4,585
1 vote

Load all gallery images in category on hover (Ajax)

To optimize the speed, You can perform the following steps: Create one JS function to call on hover on product Inage and Pass Product SKU as argument. Create Ajax call to one Ajax Controller Action ...
user avatar
1 vote

SQL export of products and associated image gallery files

I figured it out: SELECT catalog_product_entity.sku, GROUP_CONCAT(CONCAT_WS(':', catalog_product_entity_media_gallery.value) SEPARATOR ',') AS Gallery, catalog_product_entity....
user avatar
  • 11
1 vote

How to save product gallery image with param image is url, in Magento-2?

Magento 2 doesn't take gallery images directly from url, so first you will need to download them to local storage preferably pub/media/your_folder . And then simply add them as following.[ Please use ...
user avatar
  • 4,585

Only top scored, non community-wiki answers of a minimum length are eligible