added better image check for pages