staempfli / magento2-module-image-resizer

Magento 2 Module to add simple image resizing capabilities in all blocks and .phtml templates
92 stars 32 forks source link

Set backgroundColor image #3

Closed PieterCappelle closed 7 years ago

PieterCappelle commented 7 years ago

Any plans to add functionality to change the background color? Default is white in Magento.

https://github.com/magento/magento2/blob/develop/app/code/Magento/Catalog/Helper/Image.php

jalogut commented 7 years ago

Hi @PieterCappelle

We did not have any plans to add this because the main purpose is just to resize images. However, I would be glad if you want to contribute with that. It should be an easy change, you would only need to add a couple of lines:

After this changes, you should be able to pass any blackground color to resizeAndGetUrl() in the $resizeSettings param

jalogut commented 7 years ago

Hi @PieterCappelle

This functionality has been added in version 1.1.