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 a check for big base64 images #20318

Open
monbauza opened this issue May 15, 2023 · 7 comments
Open

Add a check for big base64 images #20318

monbauza opened this issue May 15, 2023 · 7 comments

Comments

@monbauza
Copy link

Moved from https://yoast.atlassian.net/browse/IM-1909
Reporter: @manuelaugustin

Description

We’ve encountered cased where people put very large base64-encoded data urls in their text (see attachment).

This not only crashes our analysis, but might also break browsers. So it’s bad practice to do this.

Detailed information provided by @jono :

Best practice is to base64 encode small images so that the trade-off on not having to make a network request is positive. For large/complex images, that trade-off doesn't work out; you cripple the browser (and ship a mountain of bytes), and, break/bypass a whole bunch of browser heuristics.

This might be a common problem:

[It might be] common to copy/paste in a big base64 image, especially if it's moving between canvases (e.g., Google search > MS Word > Gutenberg)

We could implement check for base64 images above a certain size in our Paper early in the analysis loop to display a warning about too large base64 images crippling your website (and our analysis).

description.txt

@monbauza
Copy link
Author

Comment from Hanna Worku:

Would this work as a new condition the the Images assessment?

@monbauza
Copy link
Author

Please inform the customer of conversation # 1010926 when this conversation has been closed.

@monbauza
Copy link
Author

The SEO data optimization failed for the above customer with error "too much recursion" because one of their posts has a big base64 image. The response for /wp-json/yoast/v1/prominent_words/get_content was truncated (Firefox).

image

@monbauza
Copy link
Author

monbauza commented Jul 3, 2023

Please inform the customer of conversation # 1031752 when this conversation has been closed.

@suascat
Copy link

suascat commented Aug 22, 2023

Please inform the customer of conversation # 1049204 when this conversation has been closed.

@suascat
Copy link

suascat commented Sep 25, 2023

Please inform the customer of conversation # 1058610 when this conversation has been closed.

@suascat
Copy link

suascat commented Jul 15, 2024

Please inform the customer of conversation # 1152149 when this conversation has been closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants