aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/README.md b/README.md
index 625b960624..48a33f8b3d 100644
--- a/README.md
+++ b/README.md
@@ -63,6 +63,13 @@ class MessagesController < ApplicationController
end
```
+Variation of image attachment:
+
+```erb
+<%# Hitting the variant URL will lazy transform the original blob and then redirect to its new service location %>
+<%= image_tag url_for(user.avatar.variant(resize: "100x100")) %>
+```
+
## Installation
1. Add `require "active_storage"` to config/application.rb, after `require "rails/all"` line.