When rendering with Go image libraries fails fallback to ImageMagick

This commit is contained in:
Kovid Goyal
2025-10-09 09:40:46 +05:30
parent 2ac2c17929
commit 9be66bfe4a
2 changed files with 7 additions and 3 deletions

View File

@@ -712,7 +712,7 @@ func OpenImageFromPath(path string) (ans *ImageData, err error) {
defer f.Close()
ans, err = OpenNativeImageFromReader(f)
if err != nil {
return nil, fmt.Errorf("Failed to load image at %#v with error: %w", path, err)
return OpenImageFromPathWithMagick(path)
}
} else {
return OpenImageFromPathWithMagick(path)