Title: Attach image from folder
Last modified: August 20, 2016

---

# Attach image from folder

 *  [jnhghy](https://wordpress.org/support/users/jnhghy/)
 * (@jnhghy)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/attach-image-from-folder/)
 * Hi,
    I’m working on an classifieds site and we have a large database of images
   with buildings. When a user is listing an ad the website needs to be able to 
   attach our images to that post accordingly to some custom fields values. What
   I was trying was to insert in the database a new row for the image attachment
   with the new post as parent. But I didn’t find the correct way to link the image
   path to the new inserted field in wp_posts. So my question is if I need to add
   a new attachment in the database (from the mysql point of view ) how would I 
   go by defining the image path? If anybody has a different way of going I am as
   receptive as possible to new ideas on how to do this. Thank you a lot. Jnhghy

The topic ‘Attach image from folder’ is closed to new replies.

## Tags

 * [attachment](https://wordpress.org/support/topic-tag/attachment/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [image](https://wordpress.org/support/topic-tag/image/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [jnhghy](https://wordpress.org/support/users/jnhghy/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/attach-image-from-folder/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
