-
Notifications
You must be signed in to change notification settings - Fork 444
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
OMP error when uploading cover image in WebP or SVG format #7400
Comments
@NateWr I have self-assigned this one and have looked into webp issue. PRS for webp support
Should I may be look into copying the svg functionality too? FYI @asmecher |
@withanage yes I think that will be easiest. It will result in some file duplication, but the alternative will require some tricky handling of the thumbnail filename. Right now the application assumes the thumbnail is a different file with a specific filename. |
I added the svg copying to the thumbnail creation function. Seemed to me adding to the addPublicaiton and editPublication would mean more code-duplication. But logically , if it seems better to handle the copying there also regarding the future vector-graphic forms , please let me know. Updated PRS |
This looks great, and very clean. Thanks @withanage! In the pkp-lib pull request, you have added support for Finally, can you add the submodule commit to OMP so the tests will run against the correct copy of pkp-lib? |
Thanks @NateWr
Sorry, I missed that, thanks. I have updated the PR with the additions to image file validation for svg. In FileManager svg is already present.
I added the submodule update and triggered the tests. |
#7400 Upload support for image format webp and svg
Thanks @withanage! I've merged those PRs and applied the changes to |
Thanks @NateWr for forward-porting to main. |
Describe the bug
When uploading a cover image in WebP or SVG format, OMP tries to create a thumbnail but cant, so it throws a fatal error.
It looks like the code at
PublicationService::makeThumbnail()
(stable-3_3_0
) supports jpg, png and gif. It can also support webp with imagecreatefromwebp. However, SVG is trickier. There's no such thing as a "thumbnail" for a SVG. Maybe we can just copy the file to the thumbnail location for now.To Reproduce
Steps to reproduce the behavior:
What application are you using?
OMP (maybe 3.3.0-x)
Additional information
See screenshots and full error in forum post.
The text was updated successfully, but these errors were encountered: