Title: Images will not be created, when working with https
Last modified: May 7, 2018

---

# Images will not be created, when working with https

 *  [karlte](https://wordpress.org/support/users/karlte/)
 * (@karlte)
 * [8 years ago](https://wordpress.org/support/topic/images-will-not-be-created-when-working-with-https/)
 * Hi Emili!
 * The problem still in your code, after update to version 1.9.7 you have the
    same
   error again, that images will not be included in a pdf.
 * Here is the solution, which is working for me:
 * Please add the following lines in dk-pdf/vendor/mpdf/mpdf/src/Mpdf.php
 *     ```
       LineNo
       .....
       11849 
       11850         function getFileContentsByCurl($url, &$data)
       11851         {
       11852                 $this->logger->debug(sprintf('Fetching (cURL) content of remote URL "%s"', $url), ['context' => LogContext::REMOTE_CONTENT]);
       11853 
       11854                 $ch = curl_init($url);
       11855 
       11856 /**** Added by ET***/
       11857                 $p = parse_url($url);
       11858                 if ($p['scheme']=='https') {
       11859                         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
       11860                         curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
       11861                 }
       11862 /**** End Add ****/
       11863                 curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1'); // mPDF 5.7.4
       .....
       ```
   
 * If these Curl-options are set, the picture are created, otherwise the place is
   left blank.
 * Greetings karlte

Viewing 1 replies (of 1 total)

 *  [damelco](https://wordpress.org/support/users/damelco/)
 * (@damelco)
 * [8 years ago](https://wordpress.org/support/topic/images-will-not-be-created-when-working-with-https/#post-10275374)
 * hey karlte,
 * just chiming in here with a quick question …
    are your images actually ‘remote’
   to your wordpress install?
 * peace
 * -DJ

Viewing 1 replies (of 1 total)

The topic ‘Images will not be created, when working with https’ is closed to new
replies.

 * ![](https://ps.w.org/dk-pdf/assets/icon-256x256.png?rev=3396282)
 * [DK PDF - WordPress PDF Generator](https://wordpress.org/plugins/dk-pdf/)
 * [Support Threads](https://wordpress.org/support/plugin/dk-pdf/)
 * [Active Topics](https://wordpress.org/support/plugin/dk-pdf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dk-pdf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dk-pdf/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [damelco](https://wordpress.org/support/users/damelco/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/images-will-not-be-created-when-working-with-https/#post-10275374)
 * Status: not a support question