Fixing image suffix logic