I’m building an interactive application in which I’m displaying a lot of images. I originally started developing it with bokeh but ran into too many problems, the main one being I couldn’t figure out how to show images with an aspect ratio of 1. This is what brought me to the holoviz ecosystem, because whoever developed
hv.Raster figured it out for me . (That, and all the cool panel and param stuff I learned about along the way)
I’ve developed most of the components I need and started putting them together and creating the top-level layout. Ideally I’d like things to resize to take up as much space in the browser viewport as possible. I noticed however that when I use the
hv.Raster, the aspect ratio of the images isn’t preserved anymore. Although it stays close to 1 it’s not exact. This becomes more obvious
- The larger the image is displayed.
- When showing a lot of images in a grid. I’m not doing this through a holoviews layout because I have a component that shows an image along with various GUI widgets, so I’m basically laying out instances of this component in a grid.
Is there any way to use responsive sizing while maintaining image aspect ratio? Or is this a limitation of holoviews/bokeh?