The output buffer is cleared with ob_end_clean(); even when there are no images. This shouldn't really matter - if this breaks the site when there are no images, it'll break it when there are images as well. However, there's no disadvantage to making it conditional on having some output, so it's cleaner to do so.
The output buffer is cleared with
ob_end_clean();
even when there are no images. This shouldn't really matter - if this breaks the site when there are no images, it'll break it when there are images as well. However, there's no disadvantage to making it conditional on having some output, so it's cleaner to do so.See this link for details.