[resolved] image path for wp_generate_attachment_metadata (2 posts)

  1. John Luetke
    Posted 7 years ago #

    Hey all,

    For wp_generate_attachment_metadata and wp_insert_attachment, what does the file path have to be? Absolute? Relative to the WP install root? Relative to get_option('upload_path')?

    I've tried all three options, but none of them seem to work. A post of type 'attachment' is inserted into my database, but when i coupled all three attempts with wp_update_attachment_metadata, the actual information regarding the image file isn't inserted into wp_postmeta.


  2. John Luetke
    Posted 7 years ago #

    NVM, turns out my problem was the MIME type not getting set correctly.

Topic Closed

This topic has been closed to new replies.

About this Topic