Porting to component architecture of "Photo gallery" plugin