DAR-2165 | Make an additional conditional to generate only valid thumbnails