feat: add Optimize for Web tool (#68)

* feat(image-engine): add OptimizeForWebOptions type

* feat(image-engine): add optimizeForWeb operation

* feat(shared): add optimize-for-web tool definition and i18n

* feat(api): add optimize-for-web route with preview endpoint

* feat(web): add optimize-for-web settings component with live preview

* feat(web): register optimize-for-web in tool registry

* fix(web): align toggle switch translate with codebase pattern

---------

Co-authored-by: stirling-image <stirling-image@users.noreply.github.com>
This commit is contained in:
stirling-image
2026-04-14 16:16:04 +08:00
committed by GitHub
co-authored by stirling-image
parent c2c104e887
commit 5be8be3dc3
9 changed files with 590 additions and 0 deletions
+9
View File
@@ -55,6 +55,15 @@ export const TOOLS: Tool[] = [
route: "/compress",
},
// Optimization
{
id: "optimize-for-web",
name: "Optimize for Web",
description:
"Optimize images for web with format conversion, quality control, and live preview",
category: "optimization",
icon: "Globe",
route: "/optimize-for-web",
},
{
id: "strip-metadata",
name: "Remove Metadata",
+5
View File
@@ -35,6 +35,11 @@ export const en = {
rotate: { name: "Rotate & Flip", description: "Rotate, flip, and straighten images" },
convert: { name: "Convert", description: "Convert between image formats" },
compress: { name: "Compress", description: "Reduce file size by quality or target size" },
"optimize-for-web": {
name: "Optimize for Web",
description:
"Optimize images for web with format conversion, quality control, and live preview",
},
"strip-metadata": { name: "Remove Metadata", description: "Remove EXIF, GPS, and camera info" },
"edit-metadata": {
name: "Edit Metadata",