Skip to content
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

Ignore Vector Images in Image API #30196

Closed
fmontes opened this issue Sep 30, 2024 · 3 comments · Fixed by #30267
Closed

Ignore Vector Images in Image API #30196

fmontes opened this issue Sep 30, 2024 · 3 comments · Fixed by #30267

Comments

@fmontes
Copy link
Member

fmontes commented Sep 30, 2024

User Story

As a developer, I want the be able to use the Image API, but occasionally, I need to pass vector images like SVG or EPS, the API should not try to apply transformation to that kind of images.

Acceptance Criteria

  • The Image API should no longer process vector images like SVG or EPS.
  • Only raster images should be processed and returned by the API.
  • Image API should log for information purposes

Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.:

N/A

Assumptions & Initiation Needs

  • The development team has the necessary access to update the Image API endpoint.
  • Testing will be required to ensure that only raster images are being processed.

Quality Assurance Notes & Workarounds

  • QA team should verify that vector images are indeed being ignored by the Image API.
  • If any issues are found during testing, they should be documented and addressed before releasing the feature.
@valentinogiardino valentinogiardino self-assigned this Oct 3, 2024
@valentinogiardino valentinogiardino linked a pull request Oct 4, 2024 that will close this issue
3 tasks
github-merge-queue bot pushed a commit that referenced this issue Oct 7, 2024
### Proposed Changes
* Added a utility method to check for vector image extensions in
`UtilMethods`.
* Updated `ImageFilterExporter` to skip transformation for vector images
(SVG, EPS, etc.).

### Checklist
- [x] Tests
- [x] Translations
- [x] Security Implications Contemplated (add notes if applicable)

### Additional Info
This pull request addresses issue #30196, ensuring that the Image API
ignores vector images during processing. Now only raster images will be
transformed.

### Videos
#### Original

https://github.com/user-attachments/assets/8e6f04f7-aad9-4d20-a92b-b9e5c7bac485

#### Updated

https://github.com/user-attachments/assets/bb2408f0-3db5-47f4-9dd2-85ba21e98bd0
@zJaaal zJaaal self-assigned this Oct 7, 2024
@zJaaal
Copy link
Contributor

zJaaal commented Oct 8, 2024

IQA Passed

Now the Image API is Ignoring the Vector images

DotCMS Docker Image: [dotcms/dotcms:trunk_358e597]

Screenshots

Screen.Recording.2024-10-08.at.12.mp4

@zJaaal zJaaal closed this as completed Oct 8, 2024
@zJaaal zJaaal removed their assignment Oct 8, 2024
@nollymar
Copy link
Contributor

nollymar commented Oct 8, 2024

This change only covered changes in the ImageAPI. At UI level, we still need to disable the edition. A new card was created for it #30271

@bryanboza
Copy link
Member

Tested on the last trunk // Docker // FF. We are ignoring any kind of image filter on vector images
https://github.com/user-attachments/assets/d9393384-861f-4f16-9333-b644a925e4b8

@bryanboza bryanboza added the Release : 24.10.08 Bug Fixing label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants