Maybe because the page is not in give section of the tree? AS I mentioned, the sample Dancing Goat site uses e.g.:
new AttachmentVariantContextScope()
.OnSite("DancingGoatMvc")
.Type("DancingGoatMvc.Article")
.Path("/Articles", PathTypeEnum.Children)
This means that the code works on DancingGoatMVC site (code name), for DancingGoatMvc.Article page type and at the same time the article must be in /Articles section. Please, see the documentation I linked above and create your own image variant filters and variants. There is no magic that it will work on you site just so - you need to do some coding.