Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getConstrainedImageSrc = (assetDocument: Record): string => {
const materializedSize = ImageTool.maxWidth || 1000
const maxSize = materializedSize * getDevicePixelRatio()
const constrainedSrc = `${assetDocument.url}?w=${maxSize}&h=${maxSize}&fit=max`
return constrainedSrc
}
getConstrainedImageSrc = (assetDocument: Record): string => {
const materializedSize = ImageTool.maxWidth || 1000
const maxSize = materializedSize * getDevicePixelRatio()
const constrainedSrc = `${assetDocument.url}?w=${maxSize}&h=${maxSize}&fit=max`
return constrainedSrc
}