distinguish linkDef and imgDef