Solved! Go to Solution.
Views
Replies
Total Likes
Check the component which is rendering/calling this image. Also, check JS if needed. It's your code, so you should be able to better drill it down.
*WARN* - GET /content/project/us/en/about-us/events/shows/ampp-1010.thumb.600.600.png HTTP/1.1] com.day.cq.wcm.core.impl.servlets.ThumbnailServlet Cannot create thumbnail 2java.lang.NullPointerException: null
this is the error/warning I am getting
I want to create custom servlet to avoid this warn, by adding default thumbnail
You should debug, from where this image request is generated and fix the code, instead of writing custom servlet to handle this error.
How can I debug that ?
Check the component which is rendering/calling this image. Also, check JS if needed. It's your code, so you should be able to better drill it down.
Thankyou so much @Mohit_KBansal
@Mohit_KBansal I want scenario like, if thumbnail is authored it is showing that original thumbnail in the page, if not authored I want default thumbnail.
If you are using custom model, set you imgSrc field value like
If imgSrc configured in the component
set imgsrc=component's imgSrc
Else
set imgsrc=DEFAULT_IMG_PATH
In your HTL, just use imgSrc
<img src="myObj.imgSrc">
Views
Likes
Replies