Page Optimizer AI
Page Optimizer AI checks HTML image tags for common accessibility and performance issues and offers quick fixes in VS Code.
Features
- Scans HTML files in the workspace and shows image findings in the Problems panel.
- Checks lazy loading, alt text, dimensions, WebP/AVIF usage, responsive
srcset, and image file size.
- Offers quick fixes for individual findings.
- Fix All Image Issues updates missing image attributes and converts locally referenced PNG files to WebP, then updates the HTML
src values.
- Converts local JPEG and PNG files to WebP from the WebP quick fix.
- Optimizes large local images as WebP.
The original image files are kept. Generated WebP files are written beside their source images.
Use
- Open an HTML file in a workspace.
- Open the Command Palette and run Page Optimizer AI: Fix All Image Issues (including PNG to WebP).
- Review the HTML changes and generated WebP files.
The command operates on the active HTML file. Remote and embedded images are skipped.
Requirements
VS Code 1.125 or later. The extension bundles sharp for image conversion and optimization.
Development
npm install installs dependencies.
npm run compile compiles the extension.
npm run lint checks the source.
npm test runs the VS Code extension test suite.
npm run package creates a .vsix extension package.
| |