Commits
- Using R2 might be nicer, but it would require manually expiring content as they have no TTL option
- The content is stored for as long as the oembed requests, or otherwise a sensible default
- We pass default cache headers on retrieval at the moment - this could be improved to take the current TTL left on the KV object
- Most oEmbeds seem to render an internal div as the first body child, so we can try to select and only screenshot that element to allow us to have a tighter screenshot
- We can parse the oEmbed URL from a given site
- If the oEmbed type is rich, we can return an image representation of the embed
- Minimal type and error checking, no testing
- No storage/caching of generated images yet, no retaining of browser instance
- Using R2 might be nicer, but it would require manually expiring content as they have no TTL option
- The content is stored for as long as the oembed requests, or otherwise a sensible default
- We pass default cache headers on retrieval at the moment - this could be improved to take the current TTL left on the KV object