Images are Renamed, File Path Broken
-
Howdy, I hope everyone’s day is going well.
Whenever I generate static files for my build, I have encountered an issue with the file path.
The homepage contains a business logo which, when converted into html, does not display the logo’s PNG file on my local machine (the build was created using LocalWP on Windows 11). Upon inspection (the html was viewed in both FireFox and Edge, and neither displayed the image), I determined that the image is not displaying in either browser.
During file generation, I received this error:
2024/05/21 at 12:22 pm – Crawl ‘https://urbanbirdservices.local/wp-content/uploads/2024/03/elementor/thumbs/UBS-Logo-2024-02-06-High-Quality-Cornerless-qlggdi1juyf9cleg0psnukzxka2r3my325cxh7weie.png’ rejected (Client error:GET https://urbanbirdservices.local/wp-content/uploads/2024/03/elementor/thumbs/UBS-Logo-2024-02-06-High-Quality-Cornerless-qlggdi1juyf9cleg0psnukzxka2r3my325cxh7weie.png resulted in a
404 Not Found` response: <link rel=”profile” href=”https://gmpg. (truncated…) ) (found on https://urbanbirdservices.local/404_not_found/)I discovered that the PNG file had been renamed to something much different then what I uploaded the file to WordPress (the PNG had been renamed to the one mentioned in the error above), and the file’s name had about 40 additional random characters appended to its original name. When the name of the PNG was changed to something short like ‘Logo.png’ and the file path edited to match, the image displayed properly (‘logo.png’ was not the original name of the image file, as the original name is the one listed in the error, sans additional characters). This seems to me to be an issue with the file path being too long, a consequence of the PNG file being renamed.
While I could leave it at that for this particular instance of the error, I have this same PNG file referenced throughout the website, and the file paths are all broken as a result. It seems to me that the solution should be to prevent this png’s file rename from being excessively long either prior to or during static generation, but I’m not sure if the issue comes from Staatic’s generation process or WordPress prior to giving the PNG over to Staatic. Does anyone else have this issue? Is there a known solution?
Plugins Used:
-Staatic
-Elementor
-Yoast SEO
-Elementor Header & Footer BuilderSettings:
-built on LocalWP
-Web server: Apache
-PHP version: 8.3.0
-Wordpress version: 6.5.3Thanks in advance!
- The topic ‘Images are Renamed, File Path Broken’ is closed to new replies.