I am looking to resize image from the DAM, my image path is stored in pathfield which direclty links to DAM asset. Where image is "/content/dam/....jpg"; I have access to DAM path, I need to get this image resized and displayed using selector. I tried the code using the foundation image component, it didn't work for me.
My jsp component file is like this
String image = "/content/dam/geometrixx/icons/office-building.png"; (assuming my dam image is like this)
Resource rsc = resourceResolver.getResource(image);
Image img3 = new Image(rsc);
img3.setSrc(img3.getPath());
img3.setSelector(".myselector");
img3.setFileReference(image);
img3.draw(out);