feat: add product image download pipeline for PageSpeed 100%
Downloads Printify CDN images via ImageDownloadWorker, processes through Media pipeline (WebP conversion, AVIF/WebP variant generation), and links to ProductImage via new image_id FK. - Add image_id to product_images table - ImageDownloadWorker downloads and processes external images - sync_product_images preserves image_id when URL unchanged - PreviewData uses local images for responsive <picture> elements - VariantCache enqueues pending downloads on startup - mix simpleshop.download_images backfill task Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
defmodule SimpleshopTheme.Repo.Migrations.AddImageIdToProductImages do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:product_images) do
|
||||
add :image_id, references(:images, type: :binary_id, on_delete: :nilify_all)
|
||||
end
|
||||
|
||||
create index(:product_images, [:image_id])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user