Results 1 to 5 of 5

Thread: Converting Db Images to Images

  1. #1

    Default Converting Db Images to Images

    I have a MySQL database with images that I want to convert to regular images. Does anybody know of a php script that will convert these. Also, what is the preferred format for images these days. I come from a jpg era and I have a feeling other formats are preferred.

  2. #2
    Registered User
    Array
    Join Date
    Mar 2015
    Location
    Beaver Falls, PA
    Posts
    888

    Default

    I can't answer the first part but as far as images go for web jpg is still popular. PNG has probably moved into second place. One of the pluses of PNG is that you can have transparency where you can't with jpg. GIF used to be the preferred way for transparency but they have fallen out of favor because of the limitations. GIF is still popular for animations.
    Ray Badger, Turbo Technologies, Inc.
    www.TurboTurf.com www.IceControlSprayers.com

  3. #3
    Web Consultant
    Array
    Join Date
    Aug 2008
    Location
    Las Vegas
    Posts
    9,794
    Blog Entries
    1

    Default

    Are there a lot of them?
    How were they originally created?
    Are they from a WordPress site?

    Would an SQl query even work? Wouldn't you have to export the images out of the database to convert them, or else they would still be in the database and still formatted as such. Right?
    Or are you trying to change their format within the database?

    I'm not sure, I'm spitballing here.

  4. #4

    Default

    They are in a a cart plugin on a wordpress site. There are thousands of images. They were created one by one adding to a cart from an admin panel. I haven't looked at this in a few years, but as I recall there is a php command to display code images.

  5. #5
    Web Consultant
    Array
    Join Date
    Aug 2008
    Location
    Las Vegas
    Posts
    9,794
    Blog Entries
    1

    Default

    Quote Originally Posted by billbenson View Post
    They are in a a cart plugin on a wordpress site. There are thousands of images. They were created one by one adding to a cart from an admin panel. I haven't looked at this in a few years, but as I recall there is a php command to display code images.
    They should still be in your WordPress media folder and you can just go right to that folder and download them as is.
    Or the cart plug in may have created it's own media folder, but same method.

    You don't need to even mess with the database, the images are on the server in a folder. With WordPress, all the database does is store the path of the images in relationship to the content and settings, not the actual images themselves.
    Last edited by Harold Mansfield; 11-07-2018 at 05:46 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •