IsImageFile returns true if the file at the given path is a supported image based on its extension. Supported formats: JPEG, PNG, GIF, WebP.
(filePath string)
| 228 | // IsImageFile returns true if the file at the given path is a supported image |
| 229 | // based on its extension. Supported formats: JPEG, PNG, GIF, WebP. |
| 230 | func IsImageFile(filePath string) bool { |
| 231 | return IsImageMimeType(DetectMimeType(filePath)) |
| 232 | } |
| 233 | |
| 234 | // IsSupportedMimeType returns true if the MIME type is supported for file attachments. |
| 235 | // Supported types include images (jpeg, png, gif, webp) and documents (pdf, text, markdown). |
no test coverage detected