import { hasImageParams } from '@broadleaf/commerce-quote-react';
const url = 'https://www.mycompany.com/green-ghost-primary.png?thumbnail=true'
const hasParams = hasImageParams(url);
console.log(hasParams);
Utilities provided by @broadleaf/commerce-quote-react
.
Adds the given image resize parameter to the image’s content URL.
Parameter | Type | Required? | Description |
---|---|---|---|
|
|
✅ |
The image URL to check. |
|
|
✅ |
The size param to add. |
|
|
✅ |
The hostname of the Commerce Gateway.
Used to determine if the |
|
|
❌ |
Mapping of the defined image size parameters |