Handle images properly for epub generation