Skip to content

WA-PERF-001: Dragonfly → libvips migration plan + Content::Asset prototype#744

Draft
kitcommerce wants to merge 2 commits intonextfrom
wa-perf-001-dragonfly-migration
Draft

WA-PERF-001: Dragonfly → libvips migration plan + Content::Asset prototype#744
kitcommerce wants to merge 2 commits intonextfrom
wa-perf-001-dragonfly-migration

Conversation

@kitcommerce
Copy link

Summary

Addresses #703 — research and prototype for replacing Dragonfly with a lightweight libvips-based storage layer.

What's included

Migration plan (docs/notes/dragonfly-migration-plan.md)

  • Full audit of all Dragonfly usage across the codebase (14+ models, custom processors, freedom patches, routing)
  • ActiveStorage vs direct libvips comparison (ActiveStorage lacks Mongoid support — not viable)
  • Recommended approach: custom storage layer + libvips processing
  • Backward compatibility strategy for downstream users with custom Dragonfly processors
  • Phased migration timeline and risk assessment

Prototype: Content::Asset behind a feature flag

Enable with WORKAREA_MEDIA_BACKEND=media_v2 (off by default — zero impact on existing behavior).

  • Workarea::Media::Storage — S3/filesystem storage using existing Workarea.config.asset_store
  • Workarea::Media::Attachment — Dragonfly-compatible wrapper (.url, .optim.url, .process())
  • Workarea::MediaController + /media2/ route (avoids Dragonfly middleware collision)
  • Content::Asset swaps backends at runtime when flag is enabled

What's NOT included (documented for follow-up phases)

  • Migration of other Dragonfly consumers (ProductImage, Avatar, Sitemap, etc.)
  • URL compatibility layer (Dragonfly URLs → new URLs)
  • CSV import/export path updates
  • Custom processor migration guide for downstream users

Client impact

None when flag is off. When enabled, only Content::Asset is affected. Full migration will need a deprecation period.

Testing

Prototype phase — manual verification. Automated test coverage planned for subsequent phases.

Closes #703

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant