diff --git a/fsl/data/image.py b/fsl/data/image.py
index b65f28105668b76867f41f6d3f0c7a0fa8100c44..2060aad046a95f998625ac0f2520240a500b845c 100644
--- a/fsl/data/image.py
+++ b/fsl/data/image.py
@@ -1540,7 +1540,8 @@ def loadMetadata(image):
     basename = op.basename(removeExt(filename))
     dirname  = op.dirname(filename)
 
-    if fslbids.inBIDSDir(image.dataSource):
+    if fslbids.isBIDSFile(image.dataSource) and \
+       fslbids.inBIDSDir( image.dataSource):
         return fslbids.loadMetadata(image.dataSource)
 
     jsonfile = op.join(dirname, '{}.json'.format(basename))