[openstreetmap/openstreetmap-website] Notification emails should use resized avatars (#2625)

Tom Hughes notifications at github.com
Wed May 13 10:08:21 UTC 2020


Yes it appears that asking for the blob of a variant actually gets you the original image not the resized version:

```
irb(main):005:0> u.avatar.variant(:resize => "50x50>").blob
=> #<ActiveStorage::Blob id: 17138, key: "gVCyCqBtcEZgv6TGpPtbyK7Q", filename: "DSC_0518.JPG", content_type: "image/jpeg", metadata: {"identified"=>true, "width"=>6000, "height"=>4000, "analyzed"=>true}, byte_size: 6219460, checksum: "3zLkl1qlvCuxWgDelFXIGA==", created_at: "2019-07-15 19:27:36">
irb(main):006:0> u.avatar.blob
=> #<ActiveStorage::Blob id: 17138, key: "gVCyCqBtcEZgv6TGpPtbyK7Q", filename: "DSC_0518.JPG", content_type: "image/jpeg", metadata: {"identified"=>true, "width"=>6000, "height"=>4000, "analyzed"=>true}, byte_size: 6219460, checksum: "3zLkl1qlvCuxWgDelFXIGA==", created_at: "2019-07-15 19:27:36">
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2625#issuecomment-627886245
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200513/5fcba614/attachment.htm>


More information about the rails-dev mailing list