Serverless Image Handler
Serverless Image Handler

Appendix E: URL Encoding for Watermarking

This solution supports URL encoding as per the industry standard RFC 3986 when watermarking images. Use the following code logic to encode the URL:

def encoding_string(string): """ Encoding URL per RFC 3986. """ return(quote(string,safe=''))

Example:

Watermarking image URL:

http://secure.gravatar.com/avatar/a432db53989289d4f251c52c72ff2bd3?d=identicon&r=g&s=14000

As per RFC 3986, the value to be provided to watermark filter should be:

http%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fa432db53989289d4f251c52c72ff2bd3%3Fd%3Didenticon%26r%3Dg%26s%3D14000