Quantcast
Channel: Adobe Community : Popular Discussions - CQ5 (read only)
Viewing all articles
Browse latest Browse all 12476

Image not being rendered and resized from DAM

$
0
0

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);

 

 




Viewing all articles
Browse latest Browse all 12476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>