9 Commits

Author SHA1 Message Date
Jorge Manrubia cb0e9b9962 Immediate avatar and embed variants (#2002)
Reverts #2001
Restores #1955
2025-12-08 14:17:06 -08:00
Jorge Manrubia c8c91259c7 Revert "Immediate avatar and embed variants" 2025-12-07 12:06:03 +01:00
Jeremy Daer 21f3f72647 Immediate avatar and embed variants
Process variants synchronously on attachment to close the window between
image upload and variant availability, guaranteeing that we won't have
lazy variant processing attempts in GET requests.

Tradeoff is that we do variant processing in upload requests, which is
actually desirable. We're working with images that should take
milliseconds to resize given that we'll already have the file on hand.

References https://github.com/rails/rails/pull/51951
2025-12-04 23:54:37 -08:00
Jorge Manrubia 825184ab1b Memoize since these are invoked several times 2025-11-03 07:30:23 +01:00
Jorge Manrubia 2ec5d37947 Add support for remote videos too 2025-11-02 09:38:48 +01:00
Jorge Manrubia ac507aa754 Add support for remote images in the seeding system 2025-11-02 09:24:38 +01:00
Mike Dalessio ef6198d394 Make sure the image variants we use are preprocessed
to avoid implicitly creating a variant during a GET to a read replica,
which will raise an exception and cause the image to fail to load.

This feels pretty brittle, to be honest, and we'll need to be careful
in the future about creating and using new variants; we will probably
need to backfill the new variant for existing images because we can't
guarantee that they will be created implicitly/lazily if the GET lands
on the replica.

ref: https://fizzy.37signals.com/5986089/collections/7/cards/942
2025-07-18 15:43:31 -04:00
Jason Zimdars 97e20c5cd7 Make nil safe 2025-07-08 16:57:48 -05:00
Jorge Manrubia b8b4ef5463 Extract common concern to examine attachments 2025-07-04 17:53:37 +02:00