Commit Graph

12 Commits

Author SHA1 Message Date
Ibrahem Khalil 8c0e24dc26
Add favicons to external link previews (#4788) 2024-03-12 22:47:51 +02:00
Icaro Motta 084d4bac0c
feat: Unfurl image URLs (#3901)
This commit adds support for unfurling static image URLs (not GIFs, not animated WebPs), such as https://placehold.co/600x400@2x.png. It also compresses images before returning them as data URIs to clients.

About compression: the compression strategy leverages the existing function images.CompressToFileLimits. A more comprehensive logic to consider the possibility of multiple image URLs being unfurled simultaneously is yet to be implemented.

Closes #3761
2023-08-21 16:48:07 +00:00
Siddarth Kumar 6ac2308ee1
Re-organise the code to be more modular (#3172) 2023-03-01 17:23:17 +05:30
Pascal Precht 2cac37c1fb fix(images): ensure decode from URL emits error on HTTP error code
We should emit an error when the request to an image to be fetched
returns and HTTP error code. Otherwise, we'll run into other higher
level errors down the line, which are misleading

Example: I kept seeing "image content type not supported" errors,
although the content type *is* supported. The actual problem was that
the decode function operates on non existing image bytes.
2022-09-19 12:55:17 +02:00
frank 6e4ac1c495 Use image server for all kind of images and integrate identity rings 2022-09-16 09:52:08 +01:00
frank 325efd01d0 Implement identity ring 2022-09-16 09:52:08 +01:00
Shivek Khurana a6e7ff6ddd
🖼 Set any url as profile picture (useful for NFTs) (#2367)
* Sound check
* Add DecodeImageURL fn
* Introduce crop dynamics
* Add center crop calculations png

* Apply suggestions from code review
Co-authored-by: RichΛrd <info@richardramos.me>

* Fix lint
* Rebase and update version
Co-authored-by: RichΛrd <info@richardramos.me>
2021-09-21 14:30:44 +05:30
Samuel Hawksby-Robinson 7beebaaf92 Added images/database functionality 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 1b59d088d8 Integrated GetMimeType() 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson a6df8adeba Renamed Decoding and Encoding funcs 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 36105aaac0 Split out encode code from decode, same for tests 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson e635869dd5 Renamed file.go to decode.go 2020-12-17 14:10:00 +01:00