• Resolved thebrowser

    (@thebrowser)


    Hi,
    I’m struggling to find a solution.

    I did a fresh reinstall of WP with a new database.
    Before changing permalinks from plain to postname I uploaded a few images.

    Now the images I uploaded are visible, all the others after selecting post name, once uploaded are not visible. Only if I click on Edit Image get displayed. But when I save them, they stay invisible.
    If I attach them, they keep staying invisible or with a broken image symbol.

    I flushed the cache, went through deactivating plugins, checked on the database if the permalink structure was consistent with my new “post name” choice and it is, I checked the uploads folder and I see they are correctly crunched, but I cannot resolve it. WP Media Library sees them but unable to display them on its editor.

    I noticed that the images that are visible have a permalink set to plain ex https://mydomain.com/?attachment_id=2982.
    The ones I upload are with the postname structure, ex. https://mydomain.com/city-1209017/.

    Also, if I select the list view, the ones visible are attached to Media, the ones I upload are unattached.

    Note that I’m using Cloudflare but I kept flushing the cache while testing. Also, when viewing in Media Library both visible and invisible images they have a file URL pointing to the uploads folder with https://… Not sure if this has anything to do with this issue, just to let you know.

    So, I wonder if someone can solve this mystery or guide through some tests to find the reason.

    thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello, thebrowser, & welcome. Please provide a site url–that could be quite helpful. If the url is pointing to https:// but your WordPress install is using https:// or vice versa, this could be the reason for your problem. When you go into ‘Settings > General’ what do your site & WordPress urls indicate? Lastly, please paste your .htaccess file into your next reply, enclosing it in like so:

     line 1
    line 2
    line 3

    Thanks.

    Thread Starter thebrowser

    (@thebrowser)

    Hi Jackie,

    I found out that Media Library will only upload and display .png images. It doesn’t for .jpg. Really don’t understand.
    In General > Settings the WP address and Site address are both set to https://…
    The site is: recoupera.com
    My .htaccess:

    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
            AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon image/webp application/json application/vnd.ms-access application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
        <IfModule mod_mime.c>
            # DEFLATE by extension
            AddOutputFilter DEFLATE js css htm html xml
        </IfModule>
    </IfModule>
    <FilesMatch "\.(html|htm|rtf|rtx|svg|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|TXT|XSD|XSL|XML)$">
        <IfModule mod_headers.c>
            Header append Vary User-Agent env=!dont-vary
        </IfModule>
    </FilesMatch>
    <FilesMatch "\.(bmp|class|doc|docx|eot|exe|ico|webp|json|mdb|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|WEBP|JSON|MDB|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$">
        <IfModule mod_headers.c>
             Header unset Last-Modified
        </IfModule>
    </FilesMatch>
    # END W3TC Browser Cache
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value memory_limit 128M
    php_value max_execution_time 180
    php_value max_input_time 180
    php_value max_input_vars 5000

    Thanks

    thebrowser, please login to your dashboard & deactivate w3-total-cache. You’ll also need to rename advanced-cache.php & object-cache.php. I personally do so by putting a 1 on the end, i.e., .ph1. Once all that’s done, please try logging in, upload a .jpg, & see if that works. Please let us know.

    Thread Starter thebrowser

    (@thebrowser)

    Hi, before going through your suggestion I found out that on my host control panel a hotlink protection option was on. This prevented .jpg images from being uploaded.
    So, I left everything as it is. Thank you for your help.

    Hey, thebrowser, thanks so much for sharing this! I’ll be certain to tuck that 1 into my bag of tricks for future use! It’s always great when folks resolve their problem & share the solution in order to help others, including support volunteers, because we don’t have all the answers. If you could please mark the topic as ‘resolved’ so the forum volunteers will understand you no longer need assistance, it’d really be appreciated.

    Thanks again, & best of luck w/your site.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Media Library images uploaded not displaying’ is closed to new replies.