`Image_Functions_Usage_Check`: Would warn about any direct output of img tags in PHP code and templates
adamsilverstein opened this issue · comments
As suggested by @felixarntz in #443, those should use wp_get_attachment_image()
etc. instead, which comes with performance benefits. The exception is img tags which aren't for attachments. For such manual img tags, the check could trigger a warning if the wp_get_loading_optimization_attributes() is not used as part of generating the output.
We could probably use the same/opposite approach as core does to to find images without the core image class (in a runtime check)
Looks like there is #26 for this already
Looks like there is #26 for this already
oh, I missed that - thanks!