Suggestion: Category Image resize
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.
how would you see this working with responsive design and media queries?
@waynemowdirect I admit I didn't think this though, but I don't think it's relevant in this case.
If there is an issue regarding the responsive design and/or media queries, the problem is there even if the image is resized or delivered as it is. or am I missing something?
+1 to resizable category images -1 to having attributes in the backend
@waynemowdirect Current responsive theme doesnt have a fix for retina images that I know of so what is your concern regarding rwd? El 02/09/2014 05:29, "waynemowdirect" [email protected] escribió:
how would you see this working with responsive design and media queries?
— Reply to this email directly or view it on GitHub https://github.com/magento/magento2/issues/649#issuecomment-54122561.
@barbazul Can you explain the problems you see with having the resize attributes in the the backend? Or any reason you don't like it?
Yes. Site administrator and site developer/designer are very.separate roles.
Every time I see modules that give design powers to the admin a small part of my soul dies. This usually can be resolved via ACL but that is not the case for category and product attributes.
Also, your proposal of having different resize values for the different page layouts (idea that I like a lot btw) is not compatible with having hardcoded values in the admin. El 02/09/2014 10:15, "Marius" [email protected] escribió:
@barbazul https://github.com/barbazul Can you explain the problems you see with having the resize attributes in the the backend? Or any reason you don't like it?
— Reply to this email directly or view it on GitHub https://github.com/magento/magento2/issues/649#issuecomment-54149032.
@tkacheva, could you please take a look at this suggestion? Thank you!
Internal ticket: MAGETWO-28058
Thank you for your submission.
We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues.
Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here).
We are closing this GitHub ticket and have moved your request to the new forum.
I needed exactly that for a project. Also noticed that it would be very convenient to easily resize images on our custom and third party modules depending on the Project design. For that reason, we created a module to resize images just calling a method. You can check it out here: https://github.com/staempfli/magento2-module-image-resizer
Thank you @jalogut for your extension. Is working very well.
@PieterCappelle you're welcome. Happy to help. I am glad that people use it :)