added code for image thumb creatioon