Adding in js fix for pages with no images