Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author WFMattR

    (@wfmattr)

    Hi,

    I have not seen this happen before — if you try to view one of the images directly, what message do you see?

    If you only see the broken images on the site, you can try right-clicking on one and choosing “View image in a new tab” (the words may be different in some browsers), to see the message.

    If you have any other plugins that affect image uploads, they may need to run code in the uploads directory — this is uncommon, but still possible.

    -Matt R

    I have the same issue.

    500 error on view image.

    I have woocommerce htaccess files of which say deny from all

    I have this htaccess file

    # BEGIN BuddyPress Docs
    RewriteEngine On
    RewriteBase /
    RewriteRule (.+) ?bp-attachment=$1 [R=302,NC]
    # END BuddyPress Docs

    other than that there are a couple .html files in plugin sub directories and 3 .less files in wc compare products.

    I was wondering if it might have something to do with image cropping?

    Thread Starter beratcelik

    (@beratcelik)

    Hello WFMattR,
    When i activate “Disable Code Execution for Uploads directory” option the images in the site do not appear. when i click to view in a new tab it gives an error “404 – Page not found”. However, if i change the option to uncheck everything works fine.
    I have quite afew plugins installed and non of them has smthng to do with images and uploads.
    bests

    I have been using Wordfence along with various other plugins including Jetpack (with the Photon module activated).
    I recently enables the ‘Disable Code Execution for Uploads directory’ and at that point only images being served by Photon were visible on the site. No images were visible with the Media management pages within WordPress Admin and the default .htaccess file (created by Wordfence) was in the uploads directory. If I turned off Photon then no images were displayed on my website at all. Disabling the ‘Code Execution’ option within Wordfence reinstated the missing images on the site and within Media manager pages.

    what media plugins are you using? Any of the folders located in the uploads directory will be affected.

    What theme are you using?

    Also you can find issues if you upload and change to a different media plugin (some transfers dont cooperate).

    I’m using Kerygma Theme from Organized Themes but no extra media plugins – though the Kerygma theme is fully responsive and images are resized on the fly – so whether it has something to do with that I don’t know.

    I have another site that runs TwentyFifteen theme that also resizes images on the fly, if I get chance later I might try to see if the images break on that site if I enable the ‘Disable Code Execution for Uploads directory’ in Wordfence.

    The responsive is a css value. It’s not editing the picture. But you can find bbpress, buddypress, woocommerce, etc all inside your uploads directory. If there is an attachment, an avatar, product photo, etc. They are stored in the media gallery, but categorized on the server into folders under the uploads directory.

    Default-to-GD has worked for some people with this. As it can be a misconfiguration on the server as well, such as image magic.

    Plugin Author WFMattR

    (@wfmattr)

    @beratcelik: It’s strange to see a 404 there — it might be a combination of issues, like if your host has any rewrites built in, or something like mod_security that might change the result. (Typically there would be a “500” error if your server doesn’t allow some of the directives that are added to the .htaccess file in the “uploads” directory.) If your host’s control panel has an option to disable mod_security, you could try that temporarily and see if it works then, or if you get a different error message — you might also see some details int he site’s error log file.

    @boionfire81 & @mattlhch: It’s most likely that your server doesn’t allow the “ExecCGI” in .htaccess files, which is used as part of the execution prevention. You could ask the host if they can enable that (using AllowOverride in their server settings). If you still have trouble and need more details, please make a new post using the form at the bottom of the Wordfence forum here. (The wordpress.org forum rules ask us to keep each person’s issues separate, and it also helps us keep track of open issues, so no one gets skipped in long posts.) Thanks!

    -Matt R

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Wordfence vs Uploaded images’ is closed to new replies.