Home Forums General Issues Change in upload path breaks image URL


Change in upload path breaks image URL

  • Hi guys,

    So after using my WordPress installation to upload a number of images with the ACF plugin using the default WordPress upload path (wp-content/uploads).

    I now want to change my upload path and have edited my wp-config.php file for new uploads to be saved in a new directory. However after this change all images that are being called using the_field function, but uploaded before the change in directory, are using the new file structure and therefore obviously do not exist.

    Any advice on how I can change my upload directory without it rendering all images uploaded using ACF broken would be much appreciated!

  • Hi @michaelbenson

    ACF will save the attachemnt ID as the custom field value.

    This means that when you use get_field / the_field, ACF will load the image data via the function wp_get_attachment_image_src:

    Perhaps you should research the logistics of changing the upload folder mid development.


Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Change in upload path breaks image URL’ is closed to new replies.