Title: plugin inject HTML code in XMLRPC responses
Last modified: August 30, 2016

---

# plugin inject HTML code in XMLRPC responses

 *  Resolved [woltis](https://wordpress.org/support/users/woltis/)
 * (@woltis)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/)
 * The EWWW Image Optimizer inject HTML code in XMLRPC responses. This causes error
   messages e.g. in the WordPress export modules for Adobe Lightroom like [http://alloyphoto.com/plugins/nextgen/](http://alloyphoto.com/plugins/nextgen/)
 * The injected code contains messages about the optimization of the images.
 * The Image Optimizer should not inject HTML code in XMLRPC responses. This makes
   the XML invalid and stops external programs.
 * [https://wordpress.org/plugins/ewww-image-optimizer/](https://wordpress.org/plugins/ewww-image-optimizer/)

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

 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/#post-6270295)
 * Agreed, it should not do that, but apparently the xmlrpc files have different
   headers than other xml files. Can you provide a link to the xmlrpc file in question?
 *  [vlad13](https://wordpress.org/support/users/vlad13/)
 * (@vlad13)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/#post-6270325)
 * This happens after completing an image upload.
    The XMLRPC response to a ngg.
   uploadImage method call contains a chunk of HTML:
 * <div id=”bulk-forms”><p>Die Thumbnails deiner neuen Bilder wurden nicht optimiert.
   </p>
    <form id=”thumb-optimize” method=”post” action=”admin.php?page=ewww-ngg-
   thumb-bulk”> <input type=”hidden” id=”ewww_wpnonce” name=”ewww_wpnonce” value
   =”101f5f6a56″ /><input type=”hidden” name=”_wp_http_referer” value=”/xmlrpc.php”/
   > <input type=”hidden” name=”ewww_attachments” value=”a:1:{i:0;i:891;}”> <input
   type=”submit” class=”button-secondary action” value=….
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/#post-6270428)
 * Ah, that is so that you can optimize the thumbs after uploading images in legacy
   versions of nextgen. Is it causing some sort of problem?
 *  Thread Starter [woltis](https://wordpress.org/support/users/woltis/)
 * (@woltis)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/#post-6270442)
 * Yes, after the image-upload directly from Lightroom, EWWW tries to optimize the
   thumbnails. In this case the attached message says, that there was nothing to
   optimize and there is the (German) message “Die Thumbnails deiner neuen Bilder
   wurden nicht optimiert.” (thumbnails of your new pictures where not optimized)
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/#post-6270469)
 * Are you using Nextcellent, or the original NextGEN 1.x?
 *  Thread Starter [woltis](https://wordpress.org/support/users/woltis/)
 * (@woltis)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/#post-6270470)
 * I’m using version 1.9.26 of NextCellent.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/#post-6270477)
 * I think what I’ll end up doing is creating a filter to override the output, and
   then I can whip up a quick sample plugin to suppress the output.
 * I don’t want to entirely disable that output, and I don’t like the idea of adding
   yet another option for what seems to be a very small percentage of users encountering
   the problem (in 2+ years no one has ever complained about it).
 * I’ll let you know when I’ve got something worked up for testing.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/#post-6270479)
 * Ok, you can download the dev version from here:
 * And then add this into a new file in the wp-content/plugins/ folder, and activate
   the ‘plugin’:
 *     ```
       <?php
       /*
       Plugin Name: EWWW NGG Thumb Output Filter
       Version: .1
       */
   
       add_filter( 'ewww_ngg_new_thumbs', 'suppress_xmlrpc_output' );
       function suppress_xmlrpc_output( $output ) {
               return '';
       }
       ```
   
 * You can change the Plugin Name if you like, or add the code into the functions.
   php for your theme, or anywhere else if you wish, but doing it as a separate 
   plugin is probably the cleanest.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/#post-6270501)
 * Oops, forgot to post the link last time. Turns out that was a good thing, since
   it wasn’t quite fixed. I found the last remaining glitch, tested it, and pushed
   it to the dev branch here: [https://downloads.wordpress.org/plugin/ewww-image-optimizer.zip](https://downloads.wordpress.org/plugin/ewww-image-optimizer.zip)
 * As before, you’ll need the ‘EWWW NGG Thumb Output Filter’ plugin to make this
   work.
 *  Thread Starter [woltis](https://wordpress.org/support/users/woltis/)
 * (@woltis)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/#post-6270508)
 * Sorry for me being so quiet.
 * I was able to test this now and put the code in my functions.php.
 * The Lightroom-upload works great now without any upload errors and with every
   info (titel, description) inserted correctly in the NextCellent-Gallery.
 * Thank you for fixing this!

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

The topic ‘plugin inject HTML code in XMLRPC responses’ is closed to new replies.

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

## Tags

 * [export](https://wordpress.org/support/topic-tag/export/)
 * [lightroom](https://wordpress.org/support/topic-tag/lightroom/)

 * 10 replies
 * 3 participants
 * Last reply from: [woltis](https://wordpress.org/support/users/woltis/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/plugin-inject-html-code-in-xmlrpc-responses/#post-6270508)
 * Status: resolved