portfolio templates react to size of image gallery