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

feat: support png, gif, webp #7947

Merged
merged 5 commits into from
Nov 6, 2024
Merged

feat: support png, gif, webp #7947

merged 5 commits into from
Nov 6, 2024

Conversation

ZuzooVn
Copy link
Contributor

@ZuzooVn ZuzooVn commented Sep 3, 2024

Checklist:

Important

Please review the checklist below before submitting your pull request.

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

PNg

  • Before
Screenshot 2024-09-04 at 6 39 46 AM - After Screenshot 2024-09-04 at 6 40 07 AM

GIF, WEBP

  • Before
Screenshot 2024-09-04 at 6 40 37 AM - After
2024-09-04_06-41-13.mp4

Type of Change

  • New feature (non-breaking change which adds functionality)

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. 💪 enhancement New feature or request labels Sep 3, 2024
@xuzuodong
Copy link
Contributor

Since animated images do not require cropping, we need to ensure that even if the user uploads a non-square image, it will be displayed without stretching.

image

@ZuzooVn
Copy link
Contributor Author

ZuzooVn commented Sep 5, 2024

thank @xuzuodong , I will fix it asap

@ZuzooVn ZuzooVn marked this pull request as draft September 5, 2024 09:05
@ZuzooVn ZuzooVn marked this pull request as ready for review September 25, 2024 06:55
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Sep 25, 2024
@xuzuodong
Copy link
Contributor

The implementation for determining animated .webp images looks good to me.

Could you also review the other minor issues mentioned above?

@ZuzooVn
Copy link
Contributor Author

ZuzooVn commented Oct 7, 2024

The implementation for determining animated .webp images looks good to me.

Could you also review the other minor issues mentioned above?

@xuzuodong I did it

@xuzuodong
Copy link
Contributor

@ZuzooVn Uploading an animated image will raise an error now.

2024-10-08.09.35.41.mov

@ZuzooVn
Copy link
Contributor Author

ZuzooVn commented Oct 11, 2024

@xuzuodong I can not reproduce this issue. Could you please send me that image?

@xuzuodong
Copy link
Contributor

Here's the webp image:

animated-webp-supported.webp.zip

Although I don't think there's anything special about this image; the error is clearly caused by accessing file property from an undefined value. If you check web/app/components/base/app-icon-picker/index.tsx, there's a lot of TypeScript error:

2024-10-11.17.19.25.mov

@crazywoola
Copy link
Member

Hello can you resolve those comments.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 6, 2024
@crazywoola crazywoola merged commit ac0fed6 into langgenius:main Nov 6, 2024
4 checks passed
iamjoel pushed a commit that referenced this pull request Nov 7, 2024
AlwaysBluer pushed a commit to AlwaysBluer/dify that referenced this pull request Nov 14, 2024
idonotknow pushed a commit to AceDataCloud/Dify that referenced this pull request Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants