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

Fix not showing a message that instructs users to NOT use an image larger than 5MB for Twitter #21257

Open
Tracked by #21207
leonidasmi opened this issue Mar 21, 2024 · 0 comments

Comments

@leonidasmi
Copy link
Contributor

leonidasmi commented Mar 21, 2024

In packages\helpers\src\social-preview-image-validation\twitterValidation.js we have the validatesBytes() function that's supposed to show a The file size of the uploaded image is too large for X. File size must be less than 5MB message to users that try to use a large image as Twitter image.

That function is not used properly, because that message is never shown.

We have to fix this, so that users can be instructed not to use such big images, as it violates Twitter's guidelines

(Note, you probably have to use add_filter( 'big_image_size_threshold', '__return_false' ); to be able to upload such big images)

@enricobattocchi enricobattocchi changed the title Fix not showing a message that instructs users to NOT use an image larger than 5MB for Twitter I Fix not showing a message that instructs users to NOT use an image larger than 5MB for Twitter Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant