Use Transforms to serve covers at the right size

This commit is contained in:
Claudio Ortolina
2025-09-17 10:26:38 +03:00
parent dc9c8fca8e
commit 0996b78c7b
10 changed files with 80 additions and 68 deletions
+6
View File
@@ -37,3 +37,9 @@ defmodule MusicLibrary.Assets.Transform do
})
end
end
defimpl Phoenix.Param, for: MusicLibrary.Assets.Transform do
def to_param(transform) do
MusicLibrary.Assets.Transform.encode!(transform)
end
end