- put allowed galleries to static string[]
- change calculation of target resize to be a simple factor