Fix MediaType when reading images from cache

Fixes #8931
This commit is contained in:
Bjørn Erik Pedersen
2022-04-16 10:40:21 +02:00
parent 0093eaa683
commit 397fce5603
3 changed files with 89 additions and 3 deletions

View File

@@ -95,6 +95,7 @@ func (c *imageCache) getOrCreate(
rp := img.getResourcePaths()
rp.relTargetDirFile.file = relTarget.file
img.setSourceFilename(info.Name)
img.setMediaType(conf.TargetFormat.MediaType())
if err := img.InitConfig(r); err != nil {
return err