I was facing the same issue and came up with this more robust CSS-based solution which targets the relevant CSS class and will work across possible translations of the “No image selected”-string.
.hide-if-value :not(a) {
font-size: 0px;
color: transparent;
}
This selector can optionally be prepended with the .acf-image-uploader
or .acf-file-uploader
selector in case you want to target these fields specifically.