fix ByParent
Merge pull request #539 from justone/fix-byparent

- Images: fix ByParent function