Skip to content

Conversation

naitoh
Copy link
Owner

@naitoh naitoh commented May 5, 2025

Why?

fixes #100 #102

https://github.com/minimagick/minimagick/releases/tag/v5.0.0

Removed deprecated Image#mime_type, as it wasn't accurate.
MIME type from file content should be determined either using Marcel or MimeMagic, or mime-types or MiniMime using Image#type.

[MiniMagick] MiniMagick::Image#mime_type has been deprecated, because it wasn't returning correct result for all formats ImageMagick supports. Unfortunately, returning the correct MIME type would be very slow, because it would require ImageMagick to read the whole file. It's better to use Marcel and MimeMagic gems, which are able to determine the MIME type just from the image header.

## Why?
fixes #102

https://github.com/minimagick/minimagick/releases/tag/v5.0.0
> Removed deprecated Image#mime_type, as it wasn't accurate.
> MIME type from file content should be determined either using Marcel or MimeMagic, or mime-types or MiniMime using Image#type.

```
[MiniMagick] MiniMagick::Image#mime_type has been deprecated, because it wasn't returning correct result for all formats ImageMagick supports. Unfortunately, returning the correct MIME type would be very slow, because it would require ImageMagick to read the whole file. It's better to use Marcel and MimeMagic gems, which are able to determine the MIME type just from the image header.
```
@naitoh naitoh marked this pull request as ready for review May 5, 2025 08:16
@naitoh naitoh merged commit 5a253ef into master May 5, 2025
84 checks passed
@naitoh naitoh deleted the support_mini_magick_v5_and_use_marcel branch May 5, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mini_magick removed deprecated Image#mime_type
1 participant