u
This commit is contained in:
@@ -32,7 +32,7 @@ Adds a child article to a parent article (creates and attaches with auto-generat
|
||||
|
||||
*Source: `src/store/article/addImage.js`*
|
||||
|
||||
Adds an image to an article by its SKU, processing it into AVIF variants.
|
||||
Adds an image to an article by its SKU, processing full, thumb, and 40px-edge small-thumb AVIF variants.
|
||||
|
||||
**Parameters**
|
||||
|
||||
@@ -45,13 +45,13 @@ Adds an image to an article by its SKU, processing it into AVIF variants.
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<{picId: number, sort: number, full: {w: number, h: number, size: number}, thumb: {w: number, h: number}, fullHash: string, thumbHash: string}>` — The added image info.
|
||||
`Promise<{picId: number, sort: number, full: {w: number, h: number, size: number}, thumb: {w: number, h: number}, smallThumb: {w: number, h: number}, fullHash: string, thumbHash: string}>` — The added image info.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const result = await store.article.addImage(42, 'SKU-1', imageBuffer);
|
||||
// => { picId, sort, full: { w, h, size }, thumb: { w, h }, fullHash, thumbHash }
|
||||
// => { picId, sort, full: { w, h, size }, thumb: { w, h }, smallThumb: { w, h }, fullHash, thumbHash }
|
||||
```
|
||||
|
||||
## `article.attachChild`
|
||||
|
||||
Reference in New Issue
Block a user