adds gallery edit and creates main image resource