wc-img-ai 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
By simply providing an src to an api that does the AI for you, and you can simply get ai-rendered images anywhere you need based on the alt-attribute.
|
|
4
4
|
|
|
5
|
+
## Browser Compatibility Note
|
|
6
|
+
|
|
7
|
+
As of the current state of browser implementations, there are known limitations in Safari when extending native HTML elements, such as `<img>`, using Web Components. This may affect the functionality of AI-based img-tags in Safari. For more details, see the related [WebKit bug report](https://bugs.webkit.org/show_bug.cgi?id=182671).
|
|
8
|
+
|
|
5
9
|
```html
|
|
6
10
|
<img
|
|
7
11
|
is="ai-image"
|
|
@@ -45,10 +49,14 @@ This function sends a request to the an API to generate an image based on a give
|
|
|
45
49
|
}
|
|
46
50
|
```
|
|
47
51
|
|
|
48
|
-
#### Return
|
|
52
|
+
#### Server Return
|
|
49
53
|
|
|
50
54
|
it is expected to return a simple string
|
|
51
55
|
|
|
52
56
|
```json
|
|
53
57
|
"https://example.com/path/to/generated/image.jpg"
|
|
54
58
|
```
|
|
59
|
+
|
|
60
|
+
#### Demo
|
|
61
|
+
|
|
62
|
+
Check it out [running](https://john.ro/lab/img-ai) inside an MDX/Astro framework
|