Title: Error using an image
Last modified: June 3, 2020

---

# Error using an image

 *  Resolved [mreisphotography](https://wordpress.org/support/users/mreisphotography/)
 * (@mreisphotography)
 * [6 years ago](https://wordpress.org/support/topic/error-using-an-image/)
 * Hi,
 * First of all, thank you for your plugin. This is what I was looking for a long
   time ago, something simple.
 * Well, after installed the plugin and tried a page with a link to a PDF sample
   protected file, everything worked just fine.
 * So, when I tried use an image in that post, opening in a new window or private
   window, to testing, I’m getting this error.
 * Link to a screen capture with the error:
    [https://ibb.co/CVz7JQH](https://ibb.co/CVz7JQH)
 * Thanks in advance,
    Maurício
 * PS: Sorry my english 🙂

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

 *  Thread Starter [mreisphotography](https://wordpress.org/support/users/mreisphotography/)
 * (@mreisphotography)
 * [6 years ago](https://wordpress.org/support/topic/error-using-an-image/#post-12933609)
 * Hi again,
 * After inspecting the pwpf-hooks.php file on line 198, added the following lines
   of code:
    **libxml_use_internal_errors(true);**
 * before the call to loadHTML and
 * **libxml_use_internal_errors(false);**
 * after it.
 * And, for now, it worked. Probably this is not the best method, but solve the 
   problem. If you have another suggestion, I appreciate.
 * Thank you again.
 * Cheers,
    Maurício
    -  This reply was modified 6 years ago by [mreisphotography](https://wordpress.org/support/users/mreisphotography/).
 *  Thread Starter [mreisphotography](https://wordpress.org/support/users/mreisphotography/)
 * (@mreisphotography)
 * [6 years ago](https://wordpress.org/support/topic/error-using-an-image/#post-12933727)
 * Another question, if you don’t mind…
 * How can I insert a link to redirect to the homepage, or login form, in the access
   denied message?
 * PS: regarding the first message, about the error, I’ve tried in another website
   and worked fine, perfect, without the need to hide any error.
 * Cheers,
    Maurício
 *  Plugin Author [csorbamedia](https://wordpress.org/support/users/csorbamedia/)
 * (@csorbamedia)
 * [6 years ago](https://wordpress.org/support/topic/error-using-an-image/#post-12934793)
 * Hi Maurício,
 * Thank you for contacting us and using our plugin.
    A lot of questions in a couple
   of minutes :).
 * What you are showing in the screenshot is a warning and not really an error.
   
   But we will look into it and in the next release, we will fix it.
 * Then about your second question:
 * > How can I insert a link to redirect to the homepage, or login form, in the 
   > access denied message?
 * We stripped out all HTML because of security reasons, but are planning to enable
   this option in a new release soon.
 * I hope this has answered your questions for now.
    If there is anything don’t 
   hesitate to reach out to us.
 * Stephan Csorba
 *  Thread Starter [mreisphotography](https://wordpress.org/support/users/mreisphotography/)
 * (@mreisphotography)
 * [6 years ago](https://wordpress.org/support/topic/error-using-an-image/#post-12936611)
 * Hi Stephan,
 * Thank you for your answer.
 * I’ll wait for the next releases.
 * Cheers,
    Maurício
 *  Plugin Author [csorbamedia](https://wordpress.org/support/users/csorbamedia/)
 * (@csorbamedia)
 * [6 years ago](https://wordpress.org/support/topic/error-using-an-image/#post-12940322)
 * Hi,
 * Just a message, a new release has been published.
 * 1. Added your fix.
    2. Added a possibility to add a redirect URL.
 * Stephan Csorba
 *  Thread Starter [mreisphotography](https://wordpress.org/support/users/mreisphotography/)
 * (@mreisphotography)
 * [6 years ago](https://wordpress.org/support/topic/error-using-an-image/#post-12941110)
 * Hi Stephan,
 * That’s great news. Thank you!
 * Cheers,
    Maurício

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

The topic ‘Error using an image’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/protect-wp-files_cdced0.svg)
 * [Protect WordPress Uploads](https://wordpress.org/plugins/protect-wp-files/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/protect-wp-files/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/protect-wp-files/)
 * [Active Topics](https://wordpress.org/support/plugin/protect-wp-files/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/protect-wp-files/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/protect-wp-files/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [mreisphotography](https://wordpress.org/support/users/mreisphotography/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/error-using-an-image/#post-12941110)
 * Status: resolved