Any Upload jpg image of any size doesn't display (its like the link to the image can't be found icon)
Describe the bug
I have Uploaded multiple sizes image for the avatar image but does not display. its shows like the image cannot be loaded. Sharing a screenshot.
Using Elementor, Traveller Theme, Siteground Speed Optimization Plugin. I've used the plugin before the only difference is the theme (Traveller)
Steps to Reproduce
Screenshots, screen recording, code snippet
No response
Environment information
Device: Macbook Browser: Chrome Wordpress Elementor Traveller Theme
WordPress information
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
@plexsites - what hosting platform are you using (I assume Siteground)? Do you also see the issue in the frontend (for example, if you are able to output the Author's avatar image somewhere in a template)?
I can confirm this too (although on different hosting). The image was saved as a jpeg. And the srcset had a broken URL (did not end in a file extension).
Hello.
I have access to a website hosted on Siteground, so I was able to test this issue. I can verify the broken image of the custom avatar in the discussion settings, and my issue wasn't only limited to JPG images. I had the same issue for PNGs as well.
While carefully investigating the markup of that page, I noticed that the image URL in the src attribute and the srcset attribute was using HTTP instead of HTTPS, and my browser was blocking the request to load the HTTP image because of mixed content.
My guess was that the "WordPress Address (URL)" and the "Site Address (URL)" settings were still using the HTTP URL for the site and not the HTTPS one and that the HTTPS was enforced by the server settings. My guess was correct and as soon as I changed the "WordPress Address (URL)" and the "Site Address (URL)" settings to use the HTTPS URL, the issue was resolved.
Checking the code the plugin uses to generate the custom avatar markup in the discussion settings, I found nothing wrong.
Thank you