diff --git a/pipeline/04_best_icon/select.sql b/pipeline/04_best_icon/select.sql index 0c62493..bb0219c 100644 --- a/pipeline/04_best_icon/select.sql +++ b/pipeline/04_best_icon/select.sql @@ -6,7 +6,7 @@ -- 2. Other square sizes ≤64 -- 3. Non-square sizes ≤64 on both axes -- 4. Anything larger (downloaded because rel_sizes was undeclared) --- 5. Among equal priority: prefer PNG/GIF/ICO over WebP over SVG +-- 5. Among equal priority: prefer PNG/GIF/ICO over WebP (SVGs excluded — not supported in bundle generation) -- 6. Tiebreaker: smaller file size (less bandwidth in bundles) -- -- Usage: psql $DATABASE_URL -f pipeline/04_best_icon/select.sql @@ -17,6 +17,7 @@ FROM ( FROM icons i WHERE i.scan_state = 'completed' AND i.s3_key IS NOT NULL + AND i.content_type NOT IN ('image/svg+xml') ORDER BY i.host_id, CASE WHEN i.width = i.height AND i.width IN (64, 48, 32, 16) THEN 0 @@ -28,8 +29,7 @@ FROM ( CASE WHEN i.content_type IN ('image/png', 'image/gif', 'image/x-icon', 'image/vnd.microsoft.icon') THEN 0 WHEN i.content_type = 'image/webp' THEN 1 - WHEN i.content_type = 'image/svg+xml' THEN 2 - ELSE 3 + ELSE 2 END, i.file_size ASC ) sub