def build_image(el, meta_data):
    image_id = get_image_id(el)
    if image_id not in meta_data.relationship_dict:
        # This image does not have an image_id
        return ''
    src = meta_data.image_handler(
        image_id,
        meta_data.relationship_dict,
    )
    if image_id in meta_data.image_sizes:
        width, height = meta_data.image_sizes[image_id]
    else:
        target = meta_data.relationship_dict[image_id]
        width, height = _get_image_size_from_image(target)
    # Make sure the width and height are not zero
    if all((width, height)):
        return '<img src="%s" height="%d" width="%d" />' % (
            src,
            height,
            width,
        )
    else:
        return '<img src="%s" />' % src
    return ''
dataset/ETHPy150Open PolicyStat/docx2html/docx2html/core.py/build_image/original