I have created a Geoserver layer in Openlayers that when clicked, opens up the attribute table and a jpg. image. However, the image is too large, obscurring the attribute table and title. Is it possible to adjust the size with Freemarker in the content.ftl file?

  • Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short tour for more about how the site works
    – Ian Turton
    Oct 20, 2021 at 14:11
  • yes, it's possible - what have you tried so far?
    – Ian Turton
    Oct 20, 2021 at 14:12
  • It might be simpler to limit the width/height of images in the css for the element where you display the result stackoverflow.com/questions/12991351/…
    – Mike
    Oct 20, 2021 at 14:14
  • Thanks for the answers. First I looked in content.ftl and header.ftl to change it but I found a piece of code in css to fix it.
    – Max
    Oct 22, 2021 at 10:04

1 Answer 1


Used this in CSS to adjust the size:

    img {
        width: 300px;
        height: auto;
        object-fit: contain;
        -o-object-fit: contain;
        object-position: top;
        -o-object-position: top;


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.