Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

paperclip-meta

> 后端框架
Open source

Adds width, height, and size to paperclip images.

159 stars0 likes2 views
WebsiteGitHub

About

Adds width, height, and size to paperclip images.

Paperclip Meta

Add width, height, and size to paperclip images.

Paperclip Meta gets image dimensions after post_process_styles using paperclip's Geometry.from_file.

Paperclip Meta works with paperclip version 5.x and 6.x.

Version 2.x works with paperclip version 4.x.

Setup

Add paperclip-meta to Gemfile:

ruby
gem 'paperclip-meta'

Create migration to add a *_meta column:

ruby
class AddAvatarMetaToUsers  100
user.avatar.height(:medium)
=> 200
user.avatar.image_size
=> '60x70'
user.avatar.aspect_ratio
=> 1.5

You can pass the image style to these methods. If a style is not passed, the default style will be used.

Alternatives

https://github.com/thoughtbot/paperclip/wiki/Extracting-image-dimensions

Development

Test:

bash
bundle
bundle exec rake

Issues· 10 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rubyimagespapercliprailsruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架