Title: a few issues &#8211; thumbnail and json string output
Last modified: January 15, 2026

---

# a few issues – thumbnail and json string output

 *  Resolved [kender](https://wordpress.org/support/users/kender/)
 * (@kender)
 * [2 months, 3 weeks ago](https://wordpress.org/support/topic/a-few-issues-thumbnail-and-json-string-output/)
 * The thumbnail I am including via link (to a media gallery image) is not showing
   on the page, instead I get the generic one
 * > data:image/svg+xml,%3Csvg%20id%3D%22Layer_1%22%20data-name%3D%22Layer%201%22%
   > 20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20210%20297%
   > 22%3E%3Crect%20width%3D%22210%22%20height%3D%22297%22%20style%3D%22fill%3A%
   > 23f1f2f2%22/%3E%3Ccircle%20cx%3D%22143%22%20cy%3D%2295%22%20r%3D%2212%22%20style%
   > 3D%22fill%3A%23e3e8ed%22/%3E%3Cpolygon%20points%3D%22131%20138%20120%20149%
   > 2095%20124%2034%20184%20176%20185%20131%20138%22%20style%3D%22fill%3A%23e3e8ed%
   > 22/%3E%3C/svg%3E
 * Also, on the page when the pdf loads I am getting a json string outside of the
   flipbook – it did not load properly after this
 * I added a quick script to wrap the json in script tags in the content filter 
   and that fixed the pdf loading issue, but i am still getting no thumbnails
 *     ```wp-block-code
       add_filter('the_content', function($content) {  if (strpos($content, 'window.option_df_') === false) { return $content; }  // Step 1: Decode HTML entities so we can work with real characters  $decoded = html_entity_decode($content, ENT_QUOTES, 'UTF-8');  // Step 2: Match DearFlip JS blocks  preg_match_all( '/window\.option_df_[0-9]+\s*=.*?parseBooks\(\);\s*\}/s', $decoded, $matches );  if (!empty($matches[0])) {    foreach ($matches[0] as $js_block) {      // Step 3: Normalize curly quotes → straight quotes      $normalized = str_replace(        ['“','”','′','″','’','‘'],        ['"','"',"'",'"',"'", "'"],        $js_block      );      // Step 4: Wrap the cleaned JS in a script tag      $wrapped = '<script class="dearflip-init">' . $normalized . '</script>';      // Step 5: Replace the original JS block with the wrapped version      $decoded = str_replace($js_block, $wrapped, $decoded);    }  }  return $decoded;});
       ```
   
 * as an FYI, if needed, the shortcode is being used inside a custom block that 
   runs wp_kses, i initially tried to allow “script” through the kses bypass, that
   did not work though. 
   and I am using the thumb type: [dflip id=”1″ type=”thumb”][/
   dflip]
 * We have a paid version of dflip from codecanyon, and plan on paying for the full
   version here if we get it working

Viewing 1 replies (of 1 total)

 *  Plugin Author [Deepak Ghimire](https://wordpress.org/support/users/deip/)
 * (@deip)
 * [2 months, 1 week ago](https://wordpress.org/support/topic/a-few-issues-thumbnail-and-json-string-output/#post-18806993)
 * Try with free version. The lite version also supports thumbs.
   If you are a codecanyon
   user please follow the link for codecanyon users.[https://wordpress.dearflip.com/docs/#support](https://wordpress.dearflip.com/docs/#support)

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fa-few-issues-thumbnail-and-json-string-output%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/3d-flipbook-dflip-lite/assets/icon-128x128.gif?rev=3175518)
 * [Dear Flipbook - PDF Flipbook, 3D Flipbook, PDF embed, PDF viewer](https://wordpress.org/plugins/3d-flipbook-dflip-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/3d-flipbook-dflip-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/3d-flipbook-dflip-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/3d-flipbook-dflip-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/3d-flipbook-dflip-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/3d-flipbook-dflip-lite/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [json](https://wordpress.org/support/topic-tag/json/)
 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)

 * 1 reply
 * 2 participants
 * Last reply from: [Deepak Ghimire](https://wordpress.org/support/users/deip/)
 * Last activity: [2 months, 1 week ago](https://wordpress.org/support/topic/a-few-issues-thumbnail-and-json-string-output/#post-18806993)
 * Status: resolved