Added $image->clear();
Skip directories or unsupported images