thumbnail preview working and redirect to showpage