moved gallery img tag generation to new method
fixed error: thumbnail width/height was mixed up for img tag