mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.19k stars 508 forks source link

Run file checking of all local images #1300

Open peterbe opened 4 years ago

peterbe commented 4 years ago

Suppose you're actively working on a document, the flaw checking code will run during the build process but for images it will only check the image reference. E.g. Did you type your <img src="..."> correctly. But it won't actually check the image, if the image is local. To do that you'll have to run yarn filecheck separately which is a bit annoying. The filecheck CLI is pretty fast and pretty affordable to run on every single build when in full CRUD mode.

peterbe commented 4 years ago

Almost ironic, http://localhost:5000/en-US/docs/Glossary/lossy_compression#_flaws is a good page to use. If you turn that external image into local image it will say you no longer have any flaws. That's not true. It should probably turn one fixable flaw about the image being external, into a new flaw about the image not being losslessly compressed enough.

caugner commented 1 year ago

This becomes less important once https://github.com/mdn/yari/pull/7716 lands and we run filecheck in mdn/content via lint-staged.