Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [image]

Denotes questions about image processing, importing, upload and management.

32
votes
4answers
31k views

Get original image file from a cache URL

Is there any function that given a cache image product file return the original one? Example : => Cache URL: {BASEURL}/media/catalog/product/cache/2/image/9df78eab33525d08d6e5fb8d27136e95/a/l/IMAGE....
9
votes
4answers
35k views

Adding images with CSV import

I have been running into problem after problem with the CSV export/import functions. My currently problem is that I cannot seem to assign 'image', 'small_image', and 'thumbnail' attributes to any ...
9
votes
5answers
15k views

Magento 2: How to get resize image for Custom Module?

I'm using Magento 2 CE Version 2.1.0 I have Custom Module with Image Field. When it's uploaded, i want different size images as for product we have Thumbnail Image, List Image & Product Detail ...
20
votes
13answers
26k views

Getting full image URL of product in template

I'm trying to create a static block for showing dynamic products. This is code that is supposed to get every child category and print the image for each product in each category. <?php $...
3
votes
2answers
10k views

Issue with getting product image

Consider the example code found in my own block file: public function getImages() { $images = array(); $products = Mage::getModel('catalog/product') ->getCollection() ->...
8
votes
1answer
7k views

How to upload multiple image in admin panel grid form?

Here, I would like to upload multiple image in admin panel grid form in magento. I create images upload in admin panel grid form. Here I attached my image upload coding. [....] $fieldset->...
7
votes
2answers
11k views

Find the attribute_id by attribute_code

I need to find the attribute_id values of the attributes image, small_image and thumbnail. I know them for my database - 85, 86 and 87, but I need to make my query dynamic, instead of with hard-coded ...
7
votes
1answer
1k views

Product loop giving incorrect images

I am looping through products and getting an error with product images. The code I am working with is below: <?php $collection = Mage::getModel('catalog/product')->getCollection(); ...
3
votes
3answers
4k views

Allow SVG on Product images

How do I allow this attribute type to handle SVG?
1
vote
4answers
12k views

Getting Sub Category Images in Magento2

I am trying to get at Category Images from within Magento_Catalog\template\navigation\left.phtml. This file shows a list of sub-categories. This is that file: <?php if (!$block->getCategory())...
7
votes
1answer
3k views

Add Images in Magento Theme template file

I want to add image like footer.png in app/design/frontend/vendorname/themename/Magento_Theme/templates/html/footer.phtml Here I am adding image using <img src='<?php echo $this->...
3
votes
3answers
4k views

upgraded Magento 1.9.3.0 from 1.9.2.3 admin Images not showing & search broken

I recently upgraded to Magento ver. 1.9.3.0 from 1.9.2.3 everything seemed to go ok. Except after I clicked on the Refresh button, I got an Internal Server Error. So I fixed permissions via SSH to - ...
3
votes
2answers
5k views

Disallowed file format in Magento 1.9.2.2 after patch upload

I installed patch 8788 on my Magento shop, but now i get the error "Disalollowed file format." (I think they mean "Disallowed file format.") when i want to upload an image in at my products. How is ...
0
votes
2answers
446 views

Images Related to Attribute Label in View.phtml

I try to explain my problem. I'm working with a Store created by other people and it's difficult to me understanding everything. The Store have a custom template and, in my view.phtml, I found the ...
8
votes
1answer
5k views

Insert image at the side of payment label on checkout

How could I insert an image at the side of the payment method on checkout. In example, at the side of credit cards payment method I want to display the Visa and Master Cards logo.
4
votes
3answers
9k views

ssl error invalid or self-signed certificate magento [duplicate]

I have installed magento on my local server (wamp). Everything is going good, but when i am uploading an image for a product . I get an error "ssl error invalid or self-signed certificate". What ...
3
votes
3answers
9k views

How to edit and modify the main page of Luma theme?

For the Luma theme, how to: How to reach and edit the main page of magento 2 Luma theme? How to replace the images there with my images? How to edit the hot sellers section? How to reach and edit the ...
6
votes
2answers
8k views

Programmatically Update Image Labels

I'm trying to update my product images' labels. I want them to be the same as the name of the product. What I've tried $mediaModel = Mage::getModel("catalog/product_attribute_backend_media"); $...
5
votes
2answers
12k views

Magento 2: Get image url

I used <?php echo $this->getViewFileUrl('Vendor_Module::images/demo.jpg'); ?> <?php echo $block->getViewFileUrl('Vendor_Module::images/demo.jpg'); ?> But it's working only ...
4
votes
1answer
6k views

Magento 2 resize category & product image

I want to resize category & product images for custom widget and I prefer Magento default function so I found following code to do so but I think it's for Magento 1 $imageObj = new Varien_Image (...
3
votes
3answers
3k views

How to integrate ImageMagick to magento

We need product personalization feature as here, means we want customers to upload the product image and add text & color from product view page. Then when customer buys product, we will send a ...
2
votes
1answer
13k views

addImageToMediaGallery copy the image file to media folder

i use addImageToMediaGallery to add images for products. Images are associated correctly but i've problem, the final path become /media/catalog/product etc etc. I've tried with $product->...
2
votes
1answer
4k views

Base Image, Small Image, Thumbnail Image are not selected after product images csv import

I have successfully imported product images using csv file but Base Image, Small Image and Thumbnail Image columns in Images tab, are not selected. No Image is selected by default. So products images ...
1
vote
1answer
3k views

How can I import product image from an external URL in magento 1.9

$simpleProduct = Mage::getModel('catalog/product'); $simpleProduct->setMediaGallery (array('images'=>array (), 'values'=>array ())); Please help me.
1
vote
1answer
14k views

Make a Popup window showup on clicking a html link

I need to make a popup window come up when user clicks on a html link. Basically I'm trying to make users see a bigger picture of a wrapping paper for products. I'm not very familiar with ...
4
votes
1answer
1k views

Magento: Changing Icon for Top Level Menu Items

Is there a standard, framework supported way to add a new Icon to a Magento 2 top level Menu item? When you add a new top level Menu Item to Magento 2's backend, you end up with a generic hexagon as ...
4
votes
3answers
3k 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 ...
3
votes
2answers
321 views

Create new row in Database when we click on button

By Default Magento create new row in Database in table sales_flat_quote_item_option once we click on ADD TO CART We are giving an option of uploading custom image on Product image with help of ...
3
votes
5answers
16k views

How to get category thumbnails in navbar menus?

I have been very happy so far with "Responsive Custom Menu", however it does not have the option to pull in thumbnail images for categories and subcategories on the menu. I was about to extend it by ...
2
votes
2answers
2k views

New products on home page has blurry images after upgrading to Magento ver. 1.9.2.0

I upload my pictures at 864px by 864px. They look great on the product page (I also like that they no longer open a new window when clicked). However, the first thing my customers see are the blurry ...
1
vote
3answers
657 views

How can i solve image import not working after hosting its good working in localhost

Am not able to import image into my site, before am using localhost working good, after hosting not Working. Magento version : 1.9.2.3 Note : After i import i got positive response in Admin, right ...
-1
votes
1answer
207 views

bigger height and width image is not occupying full space in product detail page

please visit this link : you can see the base image is not occupying full space the base image is occupying full space. product 1's image is having bigger height and width size but why the product ...
12
votes
2answers
6k views

Adding an image form element to an add/edit form

I'm building a CRUD module for Magento 2 using ui components for admin list and form and one of my entities has an image field. But I cannot make it work as it should. Here is how it should work. When ...
5
votes
6answers
19k views

Product images are not uploaded in magento admin

In magento admin while adding products image is not uploading.I tried by uploading in different browsers but it too doesn't worked.I have given 777 file permissions to media folder.When i upload image,...
4
votes
2answers
4k views

Loaded product missing media_gallery attribute

I am loading a product like so: $product = Mage::getModel('catalog/product')->loadByAttribute('sku', 'MyStockCode'); Then I try to get the images using: $existingGallery = $product->...
10
votes
2answers
5k views

Magento 2 Get image Url in controller or helper?

How to get the image in the controller or helper. For example, the path of images folder: /app/code/Nitesh/Module/view/frontend/web/images /app/code/Nitesh/Module/view/frontend/web/images/image.png
8
votes
3answers
48k views

How many different ways to insert image in magento cms page?

i tried to insert image with two different ways like through CMS pages in that select page and in content use below code: <p><img src="{{skin url='images/media/404_callout1.jpg'}}" alt="" /&...
8
votes
3answers
4k views

Mini-Cart displaying Parent Product Image instead of Product Image

I've got code that will display a product in the mini-cart using ajax, when a customer clicks on Add to Cart. The issue is that it is not displaying the child product image until I do a refresh of ...
7
votes
3answers
16k views

Show product discount percent in Magento

I would like to show discount percentage on image as badge (refer image 2). I followed the instructions from http://www.customy.com/blog/show-product-discount-percent-in-magento/ and managed to show ...
4
votes
2answers
7k 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
3k views

Magento2 image file in ui component form

I have ui component layout for an image field <field name="image"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> ...
2
votes
3answers
1k 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 ...
7
votes
2answers
3k views

Customer address attribute value is not saving in Magento 2

We are working on trying to create customer address attribute as input type is File, we have downloaded the code from silksoftware by selecting "Need to Add Customer Attribute" -> "Entity Type" -> "...
5
votes
2answers
1k views

Image attribute in Product Flat Catalog

I have a Magento 1.8 CE and I figured out that when using "Product Flat Catalog", the attribute "image" is not collected. How can i add that attribute to "Product Flat Catalog" It is not possible to ...
5
votes
1answer
3k views

Magento 2: Image Processing Settings - GD2 V/s ImageMagick

Go to Admin -> Stores -> Configuration -> Advanced -> Developer -> Image Processing Settings By default, it's PHP GD2. We need to use ImageMagick or GD2? Is there more benefit of ImageMagick over ...
3
votes
6answers
15k views

Category Image / getImageUrl() is empty

In back end I can see the category has an image but if I try to show it in a template it is empty: $_category = Mage::registry('current_category'); $_imgUrl = $_category->getImageUrl(); Why ...
2
votes
1answer
951 views

How to get a Field of type “image” not to have a delete checkbox?

How to get a Field of type "image" not to have a delete checkbox ? As it's a required attribute for my form, I don't need the delete checkbox. Here is my addField example : $fieldset->addField('...
2
votes
2answers
6k views

Magento2 Base,Small & Thumbnail image is not setting by Programmatically

I am using below code to set the image as base,small and thumbnail, but it is not working. $productRepository = $this->_objectManager->create('Magento\Catalog\Api\ProductRepositoryInterface'); $...
1
vote
2answers
3k views

How to create more than one custom image uploader form in magento?

Here, I customized Magentostudy_news extension and create custom form in admin panel.When i create simple single image upload it working fine.but i need to add more then one image upload in custom ...
0
votes
1answer
1k views

DIsplay attribute image if it exists in folder

I'm adding some information to my product page and I'm not very familiar with php. Can anyone help me and indicate how can I place these two echo in to a valid if. So it should place an image if the ...