New answers tagged

2

i have found a simple solution you can try that copy all your magento 2 pub/media data in vue-storefront-api/var/magento-folder/pub/media Or create a symlink if you are working on localhost vue-storefront-api/config/local.json "magento2": { "imgUrl": "http://magento-domain/pub/media/catalog/product", "assetPath": "...


0

Seems that we hit the limit of 2147483647 for INT. So we ALTER the table catalog_product_entity_varchar with the following query; ALTER TABLE catalog_product_entity_varchar MODIFY COLUMN value_id INT UNSIGNED AUTO_INCREMENT; Some more info, seems to be a Magento 2 bug; https://github.com/magento/magento2/issues/28387


1

From the above list, these are the magento default folder which you need to take. 1. catalog 2. customer 3. dhl 4. downloadable 5. xmlconnect 6. .htaccess All other are may be third party extension use or magento use.


0

run below script for remove images from all products <?php error_reporting(1); ini_set('max_execution_time', 0); use \Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; $bootstrap = Bootstrap::create(BP, $_SERVER); $objectManager = $bootstrap->getObjectManager(); $instance = \Magento\Framework\App\...


0

Delete the specfic images <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); ini_set('memory_limit', '-1'); ini_set('max_execution_time', 0); set_time_limit(0); error_reporting(E_ALL); use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; $bootstrap = Bootstrap::create(...


0

When you run storefront at that time cache folder's images auto generated. It's magento's behavior for page speed purpose. what's you are looking for exactly??


0

I found that images in /cache/folder is auto generated on demand if they aren't cached and get request the re-generated from the original if exists and according to the sizes for specific settings, but it can be confusing as to which cache folder is for which sizes, E.G: small, thumbnail, base etc... Where could I find this dynamic created folder, is in DB ...


0

Try to run a full reindex: 1: bin/magento indexer:reindex If the issue is still present, do Flush Cache also Flush Image Cache for the images in Backend and run: 2: bin/magento catalog:images:resize


0

You may want to try: php bin/magento catalog:images:resize If You're using watermarks, ensure those are also in place in pub/media/catalog/watermark/default


0

I think these are the possibilities: Possible reason 1: You have wrong permissions on your /media/ folder Possible reason 2: Media folder is owned by another user. Possible reason 3: There’s an issue with the .htaccess file in your /media/ folder Possible reason 4: Magento cannot resize images due low PHP memory limit. Possible reason 5: The GD library is ...


0

Expand this error and check it. You need to set height & width attribute with it's value in <img> tag. For ex : <img class="product-image-photo" src="http://example.com/pub/media/catalog/product/cache/dfcdafe7c22a7c86b2c2f8e32b4bf198/w/b/wb04-blue-0.jpg" width="240" height="300" alt="Push It Messenger ...


0

As an alternative there is this tool from Thomas Negeli that I used successfully to remove over 100 gb of unused images in Magento 2.3.6: https://github.com/ThomasNegeli/M2CliTools


0

You shouldn't call objectmanager. You should extend the Block class in order to receive the productrepository on it's constructor and get the sku that way :) Here is how to do it. On you di.xml (etc/di.xml) place the following code <preference for="Magento\Catalog\Block\Product\Image" type="vendor\module\Preferences\Product\Image&...


0

create preference for Magento\Catalog\Block\Product\Image as vendor\module\Block\Product\Image.php <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace vendor\module\Block\Product; /** * Product image block * * @api * @method string getImageUrl() * @method string getWidth() * @method ...


0

Since this seems to be the top search results and none of the answers really worked for me, here's a simple helper class to get an product's thumbnail image from the cache: <?php namespace Mobweb\Core\Helper; use Magento\Framework\App\Helper\Context; use Magento\Catalog\Helper\Image as ImageHelper; class Product extends \Magento\Framework\App\Helper\...


Top 50 recent answers are included