Fix for image pathname issues