Skip to content

Suggestion: Category Image resize #649

@tzyganu

Description

@tzyganu

I have a suggestion.
Right now the image associated to the category is used in frontend as it is:

 $url = $this->_storeManager->getStore()->getBaseUrl(
            \Magento\Framework\UrlInterface::URL_TYPE_MEDIA
        ) . 'catalog/category/' . $image;

How about making it resizeable as the product images are?
Here is a use case when this might be needed:
One category has the layout 2-columns left.
I have one image that fits in this format.
I take the decision to change the layout for that specific category to 3columns. I have to reupload an image in the correct size, to fit in the new layout.

But if the image was resizeable, I could just change the resize values.
The resize values can even be 2 attributes in the backend, so when I change the layout I can change the width and height as well.

If these attributes are empty then the image is shown at full size.

Metadata

Metadata

Assignees

Labels

Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentimprovement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions