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

[Question] Use readfile() instead of file_get_contents() for inline SVG #25

Closed
dhananjaygbhardwaj opened this issue Dec 22, 2022 · 1 comment

Comments

@dhananjaygbhardwaj
Copy link

Hi Bill,

In inc/helper-functions.php, within the ea_icon() function at L145, you're using the file_get_contents() function to inline SVG in the HTML.

I recently came around an old ticket on WP where someone suggested to use PHP readfile() instead of file_get_contents(), " as it doesn't cause it to be copied to memory before being output".

I know it doesn't make any visible difference in the loading, but I still wanted to hear your thoughts?

@billerickson
Copy link
Owner

That's interesting, I wasn't aware of that! I'm updating it now to use readfile()

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

2 participants