diff --git a/fsl/wrappers/wrapperutils.py b/fsl/wrappers/wrapperutils.py
index 0f9a1842527d6ee3998c71808878ee0da99762d1..09871c100cc49aed32aa51b5f9676a41398da539 100644
--- a/fsl/wrappers/wrapperutils.py
+++ b/fsl/wrappers/wrapperutils.py
@@ -1268,7 +1268,8 @@ def fileOrImage(*args, **kwargs):
         return infile
 
     def prepOut(workdir, name, val):
-        return op.join(workdir, '{}.nii.gz'.format(name))
+        return op.join(workdir, f'{name}{fslimage.defaultExt()}')
+
 
     def load(name, path):