Hello,
The ImageProcessing gem cannot be used to retrieve image metadata, it's not related to whether you're using the MiniMagick or Vips backend. Your example doesn't throw an error because ImageProcessing builder object uses #method_missing to add operations, so the result of `pipeline.width > pipeline.height` is an ImageProcessing::Builder object, which is truthy.
You can use the store_dimensions plugin to store dimensions metadata on the cached file, and then use those in the conditional:
plugin :store_dimensions
process(:store) do |io, context|
if io.width < io.height
# ...
end
# ...
end
end
If you're using direct uploads, you'll have to also load the restore_cached_data plugin, or use refresh_metadata plugin in the process block.