What are the differences between the MIME types image/svg and image/svg+xml in the context of PHP development?
When serving SVG files in PHP, it's important to set the correct MIME type to ensure proper rendering in browsers. The MIME type for SVG files can be either "image/svg" or "image/svg+xml". While both types are widely supported, "image/svg+xml" is the more commonly used MIME type for SVG files.
// Set the correct MIME type for serving SVG files
header('Content-Type: image/svg+xml');