Questions tagged [image]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
57 views

Extract image from echoed block

Is it possible to echo a image / images from a static block? So something like this: echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId($optionText)->getImages()
0
votes
1answer
141 views

GET Magento2 category product images

How to get product images of a specific category in magento2?
1
vote
0answers
47 views

How to upload custom images in single product page in magento 1.9

How to upload custom images in single product page in magento 1.9? With product add to cart
0
votes
2answers
44 views

To retrieve image from Module

$image="<img src="echo $this->getViewFileUrl('Inchoo_Helloworld::images/Phone.jpg' To know whether this code is correct to retrieve image from Module
0
votes
3answers
118 views

Magento 2 : Access image from Module's block

I want to access image from a Block in my custom module. This is my current code: public function getCustomtxt() { $block->getViewFileUrl('images/Phone.jpg'); }
0
votes
1answer
76 views

Is it possible to determine which widget loads first on page?

When loading the homepage of my Magento 2 store it happens that the 2nd element is loading faster than the 1st element. The 1st element is a slider widget and the 2nd a image html widget. Is there a ...
2
votes
0answers
256 views

How to Display child product image for configurable product in Magento2?

I want to display child product image (which has lowest price) as a configurable product image. So if I go to configurable product view page then by default lowest price product image will display? ...
2
votes
2answers
972 views

The image content is not valid in magento 2.2.2

I have below code with save configurable Image. But images are not save pragmatically showing below error /*Add Images To The Product*/ $imagePath = "sample.png"; // path of the ...
0
votes
2answers
311 views

Magento - Use resize() function on written link of a image

I have this type of link in my tag a and i want to keep the image link express in this way Mage::getBaseUrl('media').'catalog/product/H/G/'.$simple_product->getSku().".jpg i would use resize() ...
2
votes
0answers
36 views

Product image import through csv throws required sku error

Ive multiple images for single product and Im trying to import it through csv as shown below. when I`m importing this csv file it gives me required sku error. So am i missing something here or my ...
0
votes
1answer
627 views

What's the function of $imageId parameter in Image Helper(Magento\Catalog\Helper\Image)

What's the function of $imageId parameter in Magento2 Image Helper? What is the value I should assign to it if I create a new module for new purpose? $_imagehelper = $this->helper('Magento\...
0
votes
1answer
323 views

Custom image attribute not saving programmatically in Magento2

I have created a custom image type attribute. And trying to set image from code. But it is showing random behaviour. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); ...
0
votes
1answer
30 views

Magento Image Upload Not Working

I'm trying to upload images to my magento website, but not sure why it disappears after uploading and does not show up on the product uploaded images. This is happening after I updated magento to 1.9....
4
votes
2answers
1k views

Magento2 : Call getViewFileUrl() function in block file

How to call function getViewFileUrl() in block file? For phtml it is $this->getViewFileUrl('images/img.jpg') but it's not working on block file. what is syntax for block file which class I have ...
1
vote
1answer
868 views

Get Product Id in image file

I want to get Product id in this file:- vendor\magento\module-catalog\view\frontend\templates\product\image_with_borders.phtml Magento version 2.2.3
1
vote
0answers
553 views

Fotorama zoom functionality add for child product images of group product : M2

I want to add fotorama zoom functionality for child product images of group product at product details page. i have update this ("Magento_GroupedProduct\templates\product\view\type\grouped.phtml") ...
1
vote
1answer
3k 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 ($...
0
votes
0answers
331 views

M2 - disappearing image after

once I tried to add image to product (and save it ofc) I got this error: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key ...
0
votes
0answers
176 views

How i do watermark programmatically?

I have a code that runs on 'catalog_block_product_list_collection' event. I need add to product image watermark. How i can do it? public function addLabel($collection) { $event = $collection->...
2
votes
1answer
443 views

CMS Page Memory limit has been reached

I can't upload images on my CMS home page, it says "Memory limit has been reached", i've been searching on internet a fix, and i found this one saying to change this code on Gd2.php ( /lib/Varien/...
0
votes
1answer
197 views

Magento-2 how to change image frame

I want to change the white image frame with my own image. is there any way i can do that because that white background looks so cheap. please if anyone knows how to set an image on image frame and ...
5
votes
1answer
3k views

Magento 2 - Unable to resolve the source file for image

I have created an image and have uploaded this to my theme/web/images folder. I have then ran the following: php bin/magento setup:static-content:deploy However I cannot get the image to show on ...
0
votes
2answers
331 views

I want to add a note on product detail page in admin under “Images And Videos” tab in Magento 2

How can i add a note on product detail page in admin under "Images And Videos" tab in Magento 2. Any help would be appricicated.
0
votes
1answer
100 views

Magento 2.2.2: How to use Image file available in web folder

Magento 2.2.2 How to use Image file available in the web folder. I am trying to access image file in layout/footer.phtml file and the image is available in the web/images/ folder
1
vote
1answer
980 views

Flush static files cache on production mode

There is something about Magento2 that troubles me so much. When I have a website on production mode and I need to make a simple image change how I can do it? I thought changing the image via FTP ...
1
vote
1answer
95 views

Custom Product Icon

I'm trying to add a custom icon image for specific products. I created an attribute called b2g1 and im adding the following code to my list.phtml file <ul class="products-grid"> <?...
0
votes
1answer
228 views

Magento 1.9.2. - Delete all second images of the products

During an import of all the new products in the "media gallery" section of each product, a second image path has been added for error. I want to avoid manually deleting all the second images of each ...
0
votes
1answer
133 views

Magento 2 : get full file path of full size image currently assigned to product

I want to get the full file path of the full-size image currently assigned to a product so as to rename and upload it again, any help would be appreciated.
0
votes
0answers
98 views

try to change all base images to bigger size images by importing the CSV file, but failed

I used the small size image as the base image before. Now I tried to change all the base images from 250x250 to 800x800 by import the product CSV file. After successfully importing, the small base ...
0
votes
1answer
499 views

magento2 phtml image productpage location luma theme

which file in magento 2 controls the img alt description for the productpage? i already looked at: magento_root_directory/vendor/magento/module-catalog/view/frontend/templates/product/image.phtml ...
0
votes
1answer
569 views

Magento2 - Which Phtml file controls img alt?

which file in magento 2 controls the img alt description for the front-end? i already looked at the vendor/magento/module-catalog/view/frontend/templates/product/view/gallery.phtml file, but there is ...
1
vote
0answers
441 views

How to set value of an image custom option programmatically Magento 2?

I'm trying to set a image Custom Option in a php script before adding the product to cart. Relevant code looks like this: $specialId = 123; $customOptions[$specialId] = "Special instruction custom ...
3
votes
2answers
843 views

Magento2 Script for copying Product Title to Image alt

we use magento 2.1.9ce Our products are made through an api. And they fill in the ean number at the image alt location. And unfortunatly they can't change that. But i would like to have the products ...
0
votes
1answer
598 views

How to show product custom image attribute on detail page in magento 2?

I have created custom image attribute for the product. Now I want to show this image below the product price on the detail page.
0
votes
1answer
288 views

Image being saved as “Array” in database from backend form

I have an issue where the images I'm trying to save in a backend form aren't being populated in the database properly.. My Form.php <?php class FactoryX_Blog_Block_Manage_Blog_Edit_Form extends ...
0
votes
1answer
283 views

Adding image to database from backend

In my form.php file I have added a field for an image to be inserted. $fieldset->addField('main_image', 'image', array( 'label' => Mage::helper('blog')->__('Upload a Main Image'), ...
2
votes
1answer
255 views

Product images are not uploading while saving

Product images are not uploading while saving the products. This happens only when I try to update the product. After trying to save the image, it throws an error and says, Update with id "0" does ...
0
votes
1answer
945 views

How to add icon on payment method?

I want to add icon to payment method to be like this http://prntscr.com/hvj56n this is the code from app/design/frontend/package/theme/template/checkout/onepage/payment/methods.phtml <label for="...
1
vote
1answer
651 views

Custom Product Image Label

I am trying to get the image label of a custom product image attribute, i have added options but i am unable to get the label for each type. The code i am using to pull the labels is <img src="&...
4
votes
1answer
310 views

How to check image dimension on upload?

Building a custom module and would like to have this option implemented so user will not be able to upload image if the width and height is not as specified. :P Found this example: public function ...
0
votes
0answers
780 views

Magento 2.1.7 no option to change placeholder image in product page

I've found that I've got no option in admin as stated in this post ref: https://www.alexcorradi.org/blog/2016/11/14/how-to-change-product-image-placeholders-in-magento-2 Mine looks like this: Is ...
2
votes
0answers
50 views

Individual Image for Grouped Products Magento 2 Ultimo Theme

Please help. Not able to see the individual photo for grouped products. Only appears in the cart but not the product page.
1
vote
1answer
248 views

How to re-import products with existing images

I have accidentally deleted all product from Magento store (1100 items) but few minutes before that I did export all of them to the .csv file what let me to import them back but unfortunately there no ...
2
votes
1answer
638 views

Image optimizer Magento1.9.3.2

I am using Apptrian Image Optimizer. The extension for Magento1. I have given all the necessary permission to the files which are responsible for optimizing. Still, I am getting the following error ...
0
votes
1answer
187 views

How to resize pictures from list page on Magento 2

I tried to set the product pictures from category page to 800x800 px and i can't. Be default the picutres size is 270x270 px; I changed in view.xml the values for this fields into 800x800 px but ...
0
votes
2answers
144 views

How to save/download an image from my custom phtml page in magento 1.9?

<div class='image_gallery_outer'> <?php foreach($image_array as $arr){ $image = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA)."appimages/".trim($arr['newFileName']); ?> <div ...
1
vote
4answers
4k views

How to get image path in magento 2 module

My image path is app/code/Vendor/Module/frontend/web/images/tool/test.png How to get this image path? Please see screenshot:
0
votes
1answer
86 views

Magento 2.2: Why some images can be displayed from phtml and some cannot?

Below are four examples of images randomly taken from the Net, two are displaying properly with in custom theme template using <img src="<?php echo $block->getViewFileUrl('publicite1.jpg'); ?&...
0
votes
1answer
30 views

Product image/button missing in Magento Admin only on my computer

Using: Magento v1.9.0.1 Browsers: IE & Chrome on Windows I'm having an issue where none of the images and the Browse/Upload Button in the product admin are displaying for some reason. (see image ...
2
votes
0answers
319 views

Read csv and add image in category Magento 2

I tried this code but i could not upload image <?php use \Magento\Framework\App\Bootstrap; include('app/bootstrap.php'); ini_set('max_execution_time', 36000); ini_set('post_max_size', '5000M'); ...

1
3 4
5
6 7
17