-
Notifications
You must be signed in to change notification settings - Fork 113
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
[REF] client side image processing refactor agau #3346
Draft
agau-odoo
wants to merge
4
commits into
saas-16.4-fix-image-mimetype-safari-agau
Choose a base branch
from
master-client-side-image-processing-refactor-agau
base: saas-16.4-fix-image-mimetype-safari-agau
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[REF] client side image processing refactor agau #3346
agau-odoo
wants to merge
4
commits into
saas-16.4-fix-image-mimetype-safari-agau
from
master-client-side-image-processing-refactor-agau
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…sion *: website_sale - store the correct mimetype for processed attachments - suggest jpeg formats when webp is unavailable in snippet options When processing images to apply modifications with `HTMLCanvasElement.toDataURL`, safari and some other webkit browsers return a png when asked for a webp. Steps to reproduce (4 cases): - Use safari or an affected browser - One of: - Image Field - In any regular page such as the Discuss home page, click on your user profile picture (top-right) - Click on Preferences - Change the profile picture to a webp image - Website editor - Insert a snippet containing an image - One of: - Change the image format to one of the webp formats with a lower resolution - Crop the image - Apply a shape mask - Save Old behavior: Processed images are saved with an image/webp mimetype even though the actual data type is image/png New behavior: Processed images are saved with the corresponding mimetype of the actual data To fix this, handle all possible implicit conversions through a `convertCanvasToDataURL` and return both the dataURL and the actual mimetype in `convertCanvasToDataURL` (new util in web `image_processing.js`) and `applyModifications` (from web_editor `image_processing.js`). Each case can then deal with mimetype mismatch in an appropriate way. Suggest jpeg formats instead of webp in the image snippet options when the browser is incapable of generating webp with `HTMLCanvasElement.toDataURL`. The tests cover the 4 use cases of `applyModifications` and the standalone use of `convertCanvasToDataURL`. task-3847470
This PR targets the un-managed branch odoo-dev/odoo:saas-16.4-fix-image-mimetype-safari-agau, it needs to be retargeted before it can be merged. |
agau-odoo
force-pushed
the
saas-16.4-fix-image-mimetype-safari-agau
branch
9 times, most recently
from
July 12, 2024 08:32
a6be339
to
96a966d
Compare
agau-odoo
force-pushed
the
saas-16.4-fix-image-mimetype-safari-agau
branch
15 times, most recently
from
July 22, 2024 13:06
950ccc2
to
0db4158
Compare
agau-odoo
force-pushed
the
saas-16.4-fix-image-mimetype-safari-agau
branch
from
July 23, 2024 09:40
0db4158
to
c54eb09
Compare
agau-odoo
force-pushed
the
saas-16.4-fix-image-mimetype-safari-agau
branch
from
July 23, 2024 12:44
c54eb09
to
fea3672
Compare
agau-odoo
force-pushed
the
saas-16.4-fix-image-mimetype-safari-agau
branch
3 times, most recently
from
August 23, 2024 12:00
562ccaf
to
aa81cf5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pending targeted PR merge -> forward ports -> retarget to master + rebase onto master