Custom pdf generation image is not display

  • Only png image showcase jpg and jpeg image is not display.

  • This error get only in frappe cloud, in local bench work fine.

  • Use this function for generate pdf.

  from weasyprint import HTML
  html = HTML(html content)

I am also facing the same issue.

Using this function, we retrieve all records of a form with images. The function requires the parameters ‘doctype name’, ‘doc_record_id’, and ‘print format’.

 frappe.get_print(
    "Doctype Name",
    "Record Id",
    print_format="Print format name",
                )