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

Add sizeInBytes on resized and optimized images #19707

Merged
merged 3 commits into from Mar 7, 2024

Conversation

giu1io
Copy link
Contributor

@giu1io giu1io commented Mar 7, 2024

What does it do?

Adds the sizeInBytes attribute for images that have been resized and update it for optimized images.

Why is it needed?

The previous PR #19593 was incomplete, it added the attribute only for the original file and not thumbnails or responsive images.

How to test it?

Upload an image and verify the the upload provider receives the file size for all sizes, as expected.

Related issue(s)/PR(s)

Original PR #19593

@giu1io giu1io added source: core:upload Source is core/upload package pr: fix This PR is fixing a bug fix:4 Fix made in Strapi 4 labels Mar 7, 2024
@giu1io giu1io added this to the 4.20.5 milestone Mar 7, 2024
@giu1io giu1io requested a review from Marc-Roig March 7, 2024 14:42
@giu1io giu1io self-assigned this Mar 7, 2024
Copy link
Contributor

@Marc-Roig Marc-Roig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might have to update the api tests that expected a different response when uploading images. Let me know if you need help!

@giu1io giu1io merged commit 836f745 into develop Mar 7, 2024
142 checks passed
@giu1io giu1io deleted the fix/add-size-in-bytes-for-upload-providers branch March 7, 2024 17:32
@strapi-bot
Copy link

This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/file-upload-to-customer-controller-stopped-working-in-4-20-4/36629/8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix:4 Fix made in Strapi 4 pr: fix This PR is fixing a bug source: core:upload Source is core/upload package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants