close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

storing and manipulating images on server

Thread began 6/05/2016 5:27 pm by Christopher West | Last modified 6/08/2016 6:09 pm by Christopher West | 234 views | 6 replies

Christopher WestCommunity Expert

storing and manipulating images on server

Hi there, this is a question I wanted to ask in terms of work flow on a website. And I wanted to get feedback.

For my ecommerce website I am storing product images on the server with the product SKU as the filename.
(1) Would you say this is standard practice? obviously it wouldn't be great for SEO value. (but I am using the product name in the alt tag on the page).

So that I can display a "image coming soon" image on the page if there is no product image on the server, I am using an IF statement that checks the file, example:

<?php if (file_exists("images/products/".strtoupper (substr($rsProducts->getColumnVal("ProductBrand"), 03)).$rsProducts->getColumnVal("ProductSKU").".jpg")) { ?>

       <img  src="images/products/<?php echo strtoupper (substr($rsProducts->getColumnVal("ProductBrand"), 03)); ?><?php echo($rsProducts->getColumnVal("ProductSKU")); ?>.jpg" class="responsive-image" />
        <?php ?>

It made me think, could I create a PHP script somewhere in the admin so that the php code will check the filename on the server and then cross references it to the product sku which is stored in my products table, once there is a successful result it then writes a new record to my images table in the database?
(2) The reason I am asking this, is I kind of feel I should be storing image file names in a database table.

What do you think? Are there any pros and cons to my above workflow?


Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...