Broken images displaying over HTTP vs HTTPS
-
Hello,
I have an issue where newly uploaded avatars are being called over HTTP instead of HTTPS and therefore are showing up as broken images. This occurs when accessing the admin via HTTPS, so I am unclear why it’s using HTTP for the img src.
While I can do a find and replace to fix the broken links, do you have any ideas how this can be avoided for future avatar additions?
Thanks.
-
Hello,
I just wanted to check in and see if you might have some ideas as to how I can resolve the issue mentioned in this thread.
Thank you.
@gfxdesigner can you provide an export of your Site Health Info so we can try to replicate your setup and help further triage?
Here you go:
### wp-core ### version: 5.3.6 site_language: en_US user_language: en_US timezone: -07:00 permalink: /%postname%/ https_status: true user_registration: 0 default_comment_status: open multisite: false user_count: 69 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /home/psp/public_html/library wordpress_size: 55.32 MB (58007971 bytes) uploads_path: /home/psp/public_html/library/wp-files/uploads uploads_size: 1.09 GB (1169281749 bytes) themes_path: /home/psp/public_html/library/wp-files/themes themes_size: 17.24 MB (18082549 bytes) plugins_path: /home/psp/public_html/library/wp-files/plugins plugins_size: 76.62 MB (80344921 bytes) database_size: 12.97 MB (13598646 bytes) total_size: 1.25 GB (1339315836 bytes) ### wp-active-theme ### name: Gazette Magazine - Child Theme (gazette-child) version: 1.8 author: NuminaThemes author_website: https://themeforest.net/user/NuminaThemes parent_theme: Gazette Magazine (gazette) theme_features: menus, widgets, post-thumbnails, automatic-feed-links, editor-style theme_path: /home/psp/public_html/library/wp-files/themes/gazette-child ### wp-parent-theme ### name: Gazette Magazine (gazette) version: 1.8 author: NuminaThemes author_website: https://themeforest.net/user/NuminaThemes theme_path: /home/psp/public_html/library/wp-files/themes/gazette ### wp-plugins-active (21) ### Akismet Anti-Spam: version: 4.1.7, author: Automattic All in One SEO: version: 4.0.11, author: All in One SEO Team Antispam Bee: version: 2.9.3, author: pluginkollektiv Attachments: version: 3.5.9, author: Jonathan Christopher Better Search Replace: version: 1.3.4, author: Delicious Brains Category Colors: version: 1.1, author: M.Timan Category Order and Taxonomy Terms Order: version: 1.5.7.4, author: Nsp-Code Classic Editor: version: 1.6, author: WordPress Contributors CMS Tree Page View: version: 1.6.4, author: Jon Christopher Contact Form 7: version: 5.2.2, author: Takayuki Miyoshi Enable Media Replace: version: 3.5.0, author: ShortPixel EWWW Image Optimizer: version: 5.8.2, author: Exactly WWW Honeypot for Contact Form 7: version: 1.14.1, author: Nocean iThemes Security: version: 7.8.0, author: iThemes Jetpack by WordPress.com: version: 8.7.1, author: Automattic Remove Query Strings From Static Resources: version: 1.4, author: Speed Up My Website, Your WP Expert Shortcodes Ultimate: version: 5.9.6, author: Vladimir Anokhin Simple Local Avatars: version: 2.2.0, author: Jake Goldman, 10up Simple Section Navigation Widget: version: 2.1, author: Jake Goldman (10up) WP-Optimize - Clean, Compress, Cache: version: 3.1.6, author: David Anderson, Ruhani Rabin, Team Updraft WP Extended Search: version: 2.0.1, author: 5um17 ### wp-media ### image_editor: EWWWIO_Imagick_Editor imagick_module_version: 1690 imagemagick_version: ImageMagick 6.9.10-68 Q16 x86_64 2020-12-15 https://imagemagick.org gd_version: bundled (2.1.0 compatible) ghostscript_version: 9.25 ### wp-server ### server_architecture: Linux 3.10.0-1160.11.1.el7.x86_64 x86_64 httpd_software: LiteSpeed php_version: 5.6.40 64bit php_sapi: litespeed max_input_variables: 2000 time_limit: 900 memory_limit: 256M max_input_time: -1 upload_max_size: 512M php_post_max_size: 1024M curl_version: 7.74.0 OpenSSL/1.1.1i suhosin: false imagick_availability: true htaccess_extra_rules: true ### wp-database ### extension: mysqli server_version: 10.3.22-MariaDB client_version: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $ ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /home/psp/public_html/library/wp-files WP_PLUGIN_DIR: /home/psp/public_html/library/wp-files/plugins WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: true CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined DB_CHARSET: utf8 DB_COLLATE: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable ### aioseo (1) ### noindexed: Author Archives, Date Archives, Categories (category) ### jetpack ### site_id: 81084399 ssl_cert: No time_diff: undefined version_option: 8.7.1:1594773042 old_version: 8.7:1594168210 public: Public version: 8.7.1 plan: free HTTP_HOST: psychology.edu SERVER_PORT: 443 HTTPS: on REMOTE_ADDR: 24.10.17.146 protect_header: false full_sync: {"started":"Thu, 01 Jan 1970 00:00:00 +0000","finished":"Thu, 01 Jan 1970 00:00:00 +0000","progress":[],"config":[]} sync_size: undefined sync_lag: 0 seconds full_sync_size: undefined full_sync_lag: 0 seconds idc_urls: {"home":"https:\/\/psychology.edu\/library","siteurl":"https:\/\/psychology.edu\/library","WP_HOME":"","WP_SITEURL":""} idc_error_option: false idc_optin: true cxn_tests: All Pass.
Hello,
Was the Site Health Info helpful in determining the issue?Were you able to find anything that could help with this issue?
Hi @gfxdesigner,
I’m sorry for the late reply!
About your issue, can you please check your WordPress URL setting is using HTTPS? Local avatars are cached in the database as full URLs, which are generated using the site URL setting.
> This occurs when accessing the admin via HTTPS
Do you use HTTPS only? Or you can access your site via HTTP as well?
I no longer have the issue. It’s been some time, but I believe what I did was a find and replace on all previously uploaded Avatars and then I updated the .htaccess to rewrite any http to https for any newly added Avatars.
To answer your question, it is set to https in the WordPress URL settings.
Thanks for following up.
- The topic ‘Broken images displaying over HTTP vs HTTPS’ is closed to new replies.