refactor paragraph image compound