Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the metadata.rb from ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick/Vips.new(blob).metadata #254

Open
Mth0158 opened this issue Jul 19, 2024 · 0 comments · May be fixed by #299
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@Mth0158
Copy link
Collaborator

Mth0158 commented Jul 19, 2024

Reading Rails documentation to implement a feature for this gem, I came across the following ActiveStorage class: https://github.com/rails/rails/blob/55c4adeb36eff229972eecbb53723c1b80393091/activestorage/lib/active_storage/analyzer/image_analyzer.rb

It looks like it both supports MiniMagick and Vips since June 2021. The metadata.rb file however was built a few years before maybe explaining its presence?

We could rely on ActiveStorage::Analyzer::ImageAnalyzers to do this job, therefore decreasing the weight + associated unnecessary complexity of this gem?

UPDATE : We can't rely on ActiveStorage::Analyzer::ImageAnalyzers to do this job because it needs a saved blob, ie with its io uploaded. We only have not uploaded attachables at this point, but we can copy their structure to refactor metadata.rb (which could be a very nice addition)

@igorkasyanchuk @gr8bit what do you think of it?

@Mth0158 Mth0158 added the question Further information is requested label Jul 19, 2024
@Mth0158 Mth0158 added the enhancement New feature or request label Oct 23, 2024
@Mth0158 Mth0158 changed the title Refactor the metadata.rb using built-in ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick/Vips.new(blob).metadata Refactor the metadata.rb from ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick/Vips.new(blob).metadata Nov 8, 2024
@Mth0158 Mth0158 self-assigned this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
1 participant