I am trying to come up with a more sophisticated way to display and store Images for my Articles.

Here is my current set-up..

- Images are stored in an "images" directory.

- Articles are stored in MySQL.

- For the Article "body", I have a field which holds the Article itself, but in a marked up format like this...

<img class="noborder" src="/images/PostageMeter.png" width="150"
alt="Picture: Postage Meter.  Credit: John Doe, Wikimedia Commons."
title="Picture: Postage Meter.  Credit: John Doe, Wikimedia Commons." />

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus suscipit mattis laoreet. Quisque convallis elementum scelerisque. Nullam accumsan, purus in condimentum placerat, eros lorem pellentesque justo, eget ullamcorper purus felis et magna. Mauris blandit feugiat semper.</p>

<h3>Time is Money!</h3>
<p>Proin viverra vestibulum velit quis dapibus. Maecenas mattis mauris id eros mollis nec venenatis est faucibus. Maecenas fringilla eleifend tellus, vitae gravida purus rutrum non.</p>
- Storing the Body Text and HTML together in a database field works just fine. (However, I am wondering if it might be better to break out the "Image" and "Image Markup"...)

- For now, Images should be unique to an Article, but down the road, maybe I'll want to use one Image across multiple Articles?

- The Article Image is actually used in at least two place for a given Article... a.) In the "Article Summary" (page), b.) In the "Article" (page)

- The Image Size in the "Article Summary" and "Article Body" will vary. (One is full-sized, and the other is a reduced size.)


I am wondering if it would make more sense to do this...

- Keep the Image File in the "images" directory.

- Create an "image" table and store the:
- name
- width_main
- width_summary
- alt
- title

- When I build my "Article Summary" page, query the "article" table and dynamically build the HTML for the Image.

- When I build my "Article" page, query the "article" table and dynamically build the HTML for the Image.

Possible Pros:
- Image Info stored in *one* place
- Image Info easier to update since it is database fields

Possible Cons:
- Extra overhead to build an Article
- Slower page loads

So what do you think about all of this?