adds  codes to enable thumbnail