#756470 by publicmind: Append the filename with its extension if not already present and if it is an image.