how it works
This was inspired by carbon.now.sh and ray.so.
warning: jpeg images do not support transparency! they will have black behind the rounded borders. if you want the rounded borders, use png or webp.
warning: webp is currently only supported in chromium. other browsers will render a png instead, so this is feature-detected to make sure it's doable. see mdn for more info.
- gradient colours are chosen
- a canvas sized to your image + padding is created
- gradient is rendered
- box shadow is rendered
- image is rendered
- if enabled, watermark is rendered
- a data url is generated for each kind of image, and then is set as the corresponding image tag's source attribute