Images added to ACF image fields are having their filenames suffixed with “-1”
-
Hi,
The Frontend Admin plugin appears to be causing inconsistent image filename handling in WordPress media management. When an image is uploaded through ACF fields in my custom post types, the plugin’s interaction with WordPress’s media handling system creates a discrepancy in how image filenames are processed. Specifically, when an image is uploaded and the post is saved, WordPress appends a numerical suffix (e.g., “-1”) to the resized versions of the image, but the reference to the original/base image in the srcset attribute remains without this suffix. This creates broken image references on mobile devices as the srcset attempts to load the non-suffixed version of the file which doesn’t exist.
This issue can be reproduced consistently by: uploading a new image through an ACF image field in the any post, saving the post, and then examining the generated HTML. The srcset attribute in the img tag shows all resized versions with a numerical suffix (e.g., “-1”), while the base image reference lacks this suffix. This inconsistency causes CDN distribution issues and results in broken images on certain devices depending on which version of the image is requested through the srcset.
When I disable Frontend Admin, the issue goes away instantly. I hate to point fingers but it certainly does seem on the surface that this plugin is at least somehow involved in this issue.
- You must be logged in to reply to this topic.