Skip to content
Snippets Groups Projects
Commit 5f80214e authored by Mark A. Matney, Jr's avatar Mark A. Matney, Jr
Browse files

Constrain rendered size of static images with unknown dimensions

parent 709dae6f
Branches
Tags
No related merge requests found
......@@ -98,6 +98,12 @@ export class IIIFThumbnail extends Component {
styleProps.height = maxHeight;
} else if (!thumbHeight && thumbWidth) {
styleProps.width = maxWidth;
} else {
// The thumbnail wasn't retrieved via an Image API service,
// and its dimensions are not specified in the JSON-LD
// (note that this may result in a blurry image)
styleProps.width = maxWidth;
styleProps.height = maxHeight;
}
return {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment