-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allowed to upload images in WebP format #3384
Conversation
@fballiano can you rebase this PR since this commit? Sorry if I always make a huge mess 😅 but what matters is the substance |
the PR looks ok, I don't think there's anything to rebase :-) |
IMHO it would be great to have a single
instead of many arrays throughout the code, all of the code should be referencing to that constant :-) |
yes but it was keep untouched for backward compatibility reasons |
the one that I posted is a new one ;-) |
Personally, I would not put webp as the first image format in the list that is seen in the Backend. I would list it at the end, because it is a format after all the ones that have been so far. |
sorry i can't figure out where is showed |
he says only in the array list |
done |
please test importexport and api scenarios |
I've unified all into a single constant, see if you like it :-) |
perfect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to work fine to me!
So far so good. I would like to test "Image type product options" mentioned in the description, but I don't know anything about this feature. Any help? |
ahhhh ok then I don't know 😅 |
@addison74 you have to create a product custom options of type image that allow customers to upload an image in the frontend |
Now I understand what it is about. It should have been mentioned as "File type in custom options" . A word led to misunderstanding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this PR and encountered no issues. It is a new feature in OpenMage much discussed in the forums of the time.
yes sorry i've updated PR description |
great, let's merge it, it's a nice little new addition for the upcoming release :-) |
[Only if it is confirmed] [Photoshop Users] |
Maybe now it works, we need to try |
First we have to do a test for the Import feature we already have in OpenMage and confirm that it works (CSV file, a few images uploaded, ...). I will check these days. |
Description (*)
Since the webp format is now supported by all modern browsers *, I have added the ability to upload images in webp format.
This PR allow to upload an image in webp format and add support to resize and cache it correctly in frontend.
PS: I know that there are extensions/techniques to dynamically generate the WebP version on the frontend, but based on the target audience, with this PR, we can decide to upload them directly in the correct format.
Manual testing scenarios (*)
Test all scenarios with an image in webp format
Tested scenarios:
Untested scenarios:
I create this pull request as a draft since there are areas that I have not yet tested.
Tested on PHP 7.4.29 with GD 2.1.0 (support to webp should be enabled by default)