Forum Replies Created

Viewing 1 replies (of 1 total)
  • I had the same problem with the lack of metadata so I wrote a class to pull images from wp_posts, search for them on the filesystem to get their full path and then used the code below to regenerate all images with metadata and thumbnails for each size that is being used in the theme.

    The code below is pretty much straight from the example for wp_insert_attachment, with one difference: $fullpath = $this->search_for_file($image->post_name); this is the function in my class that finds the image in the uploads folder and returns its fullpath.

    Anyone who wants to download the class should email me, all you need to do is instantiate the class, passing the full path to your /wp-content/uploads/ folder

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 1 replies (of 1 total)