Skip to content
Snippets Groups Projects
Verified Commit 25bfa7ff authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Provide width and height metadata

parent c140876a
Branches
No related tags found
1 merge request!1Replace entire project structure
......@@ -113,6 +113,11 @@ func (processor *ImageProcessor) ProcessTask(ctx context.Context, task *asynq.Ta
}
metadata[trimmedKey] = wand.GetImageProperty(key)
}
metadata["AspectRatio"] = fmt.Sprintf(
"%d/%d",
wand.GetImageWidth(),
wand.GetImageHeight(),
)
err = processor.env.Repositories.ImageMetadata.Update(payload.ImageId, metadata)
if err != nil {
println("failed to write metadata: " + payload.ImageId)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment