Selectively prevent generation of images in media folder

Use this little plugin but on a condition: