Title: Minify inline json ld code
Last modified: August 19, 2020

---

# Minify inline json ld code

 *  Resolved [UmbrellaWeb](https://wordpress.org/support/users/umbrellaweb/)
 * (@umbrellaweb)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/minify-inline-json-ld-code/)
 * Hello.
 * Currently using wpsso core and jsonld plugin. Fantastic plugins.
 * Great work.
 * Now we are trying to get the page size as low as possible and yslow from gtmetrix
   is complaining about the inline js script which is the json ld output from your
   plugin.
 * Using wprocket as the cache plugin. It minifies all other inline code apart from
   your outputted code.
 * Is there any reason why thats not getting minified? Wprocket aupport suggests
   its due to the plugin code and or a filter plugin filter preventing it.
 * Tried it on a stock wp site with no plugins apart from qpsso core and json ld
   and wp rocket with default twenty twenty theme. Same result.
 * Can you help identify the issue please and a fix?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [JS Morisset](https://wordpress.org/support/users/jsmoriss/)
 * (@jsmoriss)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/minify-inline-json-ld-code/#post-13295585)
 * Typically minification happens when WordPress has finished constructing the webpage
   and it is sent to stdout, which is also the version caching plugins cache. There’s
   no reason WP Rocket should not be able to minimize the JSON at this point. If
   you’d prefer WPSSO to minimize the JSON instead of an optimization or caching
   plugin, you can add the following constant to your wp-config.php file:
 * define( ‘WPSSO_JSON_PRETTY_PRINT’, false );
 * js.
 *  Thread Starter [UmbrellaWeb](https://wordpress.org/support/users/umbrellaweb/)
 * (@umbrellaweb)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/minify-inline-json-ld-code/#post-13297572)
 * [@jsmoriss](https://wordpress.org/support/users/jsmoriss/) Thank you. Thats done
   thr trick.
 * FYI support from wprocket states:
 * >  If you want, you can combine them (JavaScript) using this function: [http://prntscr.com/u31qpg](http://prntscr.com/u31qpg),
   > but please take in account that not every inline JavaScript is compatible with
   > this feature, this can cause issues depending on how is programmed the JavaScript
   > code, and some of them ere excluded automatically to avoid known issues.
   > About JSON Scripts, WP Rocket doesn’t Minify o Combine them, only JavaScript
   > and CSS.
 * Seems like they dont support json minification at all and javascript only for
   some after a lto of testing depending on the site in question.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Minify inline json ld code’ is closed to new replies.

 * ![](https://ps.w.org/wpsso/assets/icon-256x256.png?rev=3167695)
 * [WPSSO Core - Complete Schema Markup and Meta Tags](https://wordpress.org/plugins/wpsso/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpsso/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpsso/)
 * [Active Topics](https://wordpress.org/support/plugin/wpsso/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpsso/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpsso/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [UmbrellaWeb](https://wordpress.org/support/users/umbrellaweb/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/minify-inline-json-ld-code/#post-13297572)
 * Status: resolved