-
Notifications
You must be signed in to change notification settings - Fork 154
Return resized image paths #4
Comments
Although I agree that this would be a nice feature, this feature is not exclusive to GraphQL and might be more interesting as a general API. I had created the feature request earlier here: magento/community-features#44 We have recently implemented https://github.com/h2non/imaginary as an api for one of our customers, but it would be nice if such a thing could be directly in Magento. The most imporant part is that a serious frontend requires modern image formats for a fast website. Spending 50% extra on images because you have to use .jpg isn't a good idea. For any serious client we revamp the functionality to:
To achieve this we use a client side webcomponent that requests the right image. It adds additional query parameters to the URL to download the correct one. The advantage of using a query parameter is that you don't need to do a query to fetch the URL of a certain size of image (the size it is rendered). |
[Forwardport] Correct sentence in comment section in class file.
magento 2.3-develop:update branch
I would find this functionality very useful to have as an option. I'm not sure requesting image sizes through GraphQL like this would be the best solution for a larger project, but again I think it would be very useful regardless. Based on the fact that this is still open and marked "for-grooming" I'm assuming this hasn't made it's way into any sort of development process yet? I didn't see anything in the docs or in the 2.3.0 codebase at least. |
@id-mitchell we will probably focus on this after checkout coverage is done. |
Will be checked in https://github.com/magento/graphql-ce/issues/611 |
As a Magento developer, I need GraphQL API to return resized image paths so that I can render storefront experiences with correctly sized images.
Acceptance criteria:
The text was updated successfully, but these errors were encountered: