don't use svg icons, they aren't supported in coversion
This commit is contained in:
parent
664197e287
commit
b94427f200
1 changed files with 3 additions and 3 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
-- 2. Other square sizes ≤64
|
-- 2. Other square sizes ≤64
|
||||||
-- 3. Non-square sizes ≤64 on both axes
|
-- 3. Non-square sizes ≤64 on both axes
|
||||||
-- 4. Anything larger (downloaded because rel_sizes was undeclared)
|
-- 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)
|
-- 6. Tiebreaker: smaller file size (less bandwidth in bundles)
|
||||||
--
|
--
|
||||||
-- Usage: psql $DATABASE_URL -f pipeline/04_best_icon/select.sql
|
-- Usage: psql $DATABASE_URL -f pipeline/04_best_icon/select.sql
|
||||||
|
|
@ -17,6 +17,7 @@ FROM (
|
||||||
FROM icons i
|
FROM icons i
|
||||||
WHERE i.scan_state = 'completed'
|
WHERE i.scan_state = 'completed'
|
||||||
AND i.s3_key IS NOT NULL
|
AND i.s3_key IS NOT NULL
|
||||||
|
AND i.content_type NOT IN ('image/svg+xml')
|
||||||
ORDER BY i.host_id,
|
ORDER BY i.host_id,
|
||||||
CASE
|
CASE
|
||||||
WHEN i.width = i.height AND i.width IN (64, 48, 32, 16) THEN 0
|
WHEN i.width = i.height AND i.width IN (64, 48, 32, 16) THEN 0
|
||||||
|
|
@ -28,8 +29,7 @@ FROM (
|
||||||
CASE
|
CASE
|
||||||
WHEN i.content_type IN ('image/png', 'image/gif', 'image/x-icon', 'image/vnd.microsoft.icon') THEN 0
|
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/webp' THEN 1
|
||||||
WHEN i.content_type = 'image/svg+xml' THEN 2
|
ELSE 2
|
||||||
ELSE 3
|
|
||||||
END,
|
END,
|
||||||
i.file_size ASC
|
i.file_size ASC
|
||||||
) sub
|
) sub
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue