Comments (5)
Hey @glebm,
Can we also go with a default? E.g.
process :quality => 25
Or would you prefer a class attribute? E.g.
class ExampleUploader < CarrierWave::Uploader::Base
class_attribute :retina_quality
self.retina_quality = 50
version :small do
process :resize_to_fill => [30, 30]
end
include RetinaRails::CarrierWave
end
process :quality => self.class.try(:retina_quality) || 25
I still don't know what the best quality would be. According to this blogpost http://blog.netvlies.nl/design-interactie/retina-revolution/ you can strip a whole lot off.
I'd rather have a default.
from retina_rails.
I've been playing around with the values today, and 25 is great for photos, and images with graphic/text in them need anywhere between 30-40.
The best would probably be to add a retina_quality
processor, so that one can do
process resize_to_fill: [30, 30], quality: 60, retina_quality: 25
from retina_rails.
I've added the option to specify retina quality by adding a retina_quality
processor. It defaults to 40. Can you confirm it's working by adding the following line to your Gemifle?
gem 'retina_rails', :git => "git://github.com/jhnvz/retina_rails.git", :branch => "retina-quality"
from retina_rails.
I am actually not using retina_rails yet, because we generate just the retina photos in our app (so, no "normal"
version, instead we resize it in the browser). For photos and quality of 25 the retina image is the same size or smaller than the original, but looks just as good or better. Thomas Fuchs' http://retinafy.me/ is a great resource for this by the way.
Also, if only a retina version is generated, there is no need for a javascript helper anymore.
from retina_rails.
Thanks! Nice source by the way. I'm thinking about extracting this logic into a seperate gem or at least a seperate version eg 2.0
from retina_rails.
Related Issues (19)
- include RetinaRails::CarrierWave doesn't keep processes that aren't resize HOT 3
- Retina only (feature) HOT 3
- Custom processors? HOT 3
- wrong file name for @2x version HOT 3
- Is there a way to reprocess images? HOT 8
- does this work with mongoid? because it uses mongoid-paperclip? HOT 8
- Carrierwave: Using only version (without url) causes error
- prevent @2x generation HOT 9
- Loads Retina image only first time opening page HOT 4
- dots get removed from urls HOT 1
- License missing from gemspec HOT 1
- Mongoid support HOT 3
- Retina for hidden images HOT 3
- Error generating "retina_dimensions" if filename is not URL friendly HOT 1
- retina_rails ignores convert options HOT 2
- Incorrectly parsed partial style sizes HOT 1
- Does version 2 support retina versions of assets/images? HOT 1
- [Rails 5] Deprecation warning HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from retina_rails.