New answers tagged media
0
votes
Media url returns nothing in Magento 2
Try below code. If you need to return a product URL it should look like this:
//todo get product object $product
$productImageAttr = $_product->getCustomAttribute( 'technologies' );
$objectManager ...
0
votes
Media url returns nothing in Magento 2
You can try setting the image as follows:
$productImageAttr = $_product->getCustomAttribute( 'technologies' );
$productImage = $this->helper('Magento\Catalog\Helper\Image')
->init($...
0
votes
Magento 2 How to change media base url programatically
Please, use interfaces for interacting with Magento.
If you are developing a custom module, you can use Magento\Framework\App\Config\Storage\WriterInterface to write configuration, and Magento\...
0
votes
Magento 2 How to change media base url programatically
In Magento 2, we need to use Dependency Injection to get an instance of Magento\Config\Model\ResourceModel\Config, which can then be used to save the config programmatically. The base_media_url needs ...
Top 50 recent answers are included
Related Tags
media × 187magento2 × 57
magento-1.9 × 39
product-images × 29
image × 29
product × 24
media-images × 18
gallery × 13
url × 12
php × 7
database × 7
cache × 7
magento-1.7 × 6
admin × 6
image-upload × 6
wysiwyg × 6
magento-2.1 × 5
magento-1.8 × 5
module × 5
product-attribute × 5
api × 5
cdn × 5
magento2.3 × 4
attributes × 4
magento-1 × 4