Skip to content

Sora-reader/link-preview-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Link preview resizer lambda

Lambda function written in Go allows you to paste image url and make link preview compatible image out of it

Default maximum and minimum dimesions are 1500x1500 and 200x200. We use 1200x630 and 250x250

So, say, you have a vertical image 100x200. This lambda will:

  1. Fetch image.
  2. Check if it should be resized to fit minimum 250x250 and 1200x630 maximum box and resize if that's the case.
  3. Copy image, resize it to 1200x630 ratio and blur.
  4. Place your image in the center of resized background and return you the new image.

Example

From this

thumbnail

To this

decoded

Releases

No releases published

Packages

No packages published