feat(images): auto-resize OG images (#2) #17

Merged
jmiller merged 2 commits from feature/2-image-auto-resize into dev 2026-05-23 23:02:53 +00:00

2 Commits

Author SHA1 Message Date
Jonathan Miller 5fc0fbfc07 feat(images): auto-resize OG images to 1200x630px (closes #2)
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Validate PR (pull_request) Failing after 3s
- New ImageHelper class with resize(), validate(), cleanup() methods
- Center-crop algorithm maintains aspect ratio to target dimensions
- GD-based processing, supports JPEG/PNG/GIF/WebP input, outputs JPEG
- Generated images cached in images/mokoog/generated/ with hash naming
- Skips resize if image already at or below target dimensions
- Skips regeneration if cached version is newer than source
- validate() checks minimum 200x200px (Facebook/WhatsApp requirement)
- cleanup() removes generated images when OG records are deleted
- Auto-resize toggle in system plugin advanced settings (default: on)
- Integrated into resolveImageUrl() in the system plugin

Authored-by: Moko Consulting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-23 17:57:07 -05:00
Jonathan Miller 54bf5f7737 feat(seo): add SEO meta tag management (closes #8)
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Validate PR (pull_request) Failing after 3s
- Add seo_title, meta_description, robots, canonical_url columns
- SQL migration for upgrades (01.01.00.sql) + updated install schema
- New "SEO Meta Tags" fieldset in article/menu editor with:
  - SEO title (70 char max, overrides <title>)
  - Meta description (200 char max)
  - Robots directive (noindex, nofollow, nosnippet, etc.)
  - Canonical URL override
- System plugin applies SEO tags in onBeforeCompileHead before OG tags
- SEO audit column in admin tag list (missing desc, title too long, noindex)
- Content plugin saves/loads all SEO fields alongside OG data

Authored-by: Moko Consulting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-23 17:50:28 -05:00