Home › Forums › General Issues › image upload button disappears after the image gets deleted from media library › Reply To: image upload button disappears after the image gets deleted from media library
I’m having this same problem. The edit/delete buttons do not appear because they only show up when the image is hovered by the mouse. If the image is missing, the img tag has no height or width, so it is impossible for the edit/delete icons to appear.
I have temporarily solved this by running some javacript that looks for ‘.acf-input .acf-image-uploader .show-if-value img’ elements with a missing src value and manually adds height and width which allows the user to hover over an empty box.
Ideally, ACF would load a default image or broken image icon if an image is missing, or display the edit/delete/add image buttons if the image is broken.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!