sync: resizePicture uses image from importer instead of local file

This commit is contained in:
nemunaire 2025-04-07 10:16:03 +02:00
commit b55151623c
2 changed files with 13 additions and 8 deletions

View file

@ -398,7 +398,7 @@ func SyncExercice(i Importer, theme *fic.Theme, epath string, dmap *map[int64]*f
if len(e.Image) > 0 {
if _, err := i.importFile(e.Image,
func(filePath string, origin string) (interface{}, error) {
if err := resizePicture(filePath, image.Rect(0, 0, 500, 300)); err != nil {
if err := resizePicture(i, origin, filePath, image.Rect(0, 0, 500, 300)); err != nil {
return nil, err
}