Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    January 18th, 2005
    Location
    Brooklyn
    Posts
    118
    Each Datafeed Has a Different Image size...
    Sorry if this question has been asked before, but I didn't come up with anything when I searched.

    I have multiple data feeds from multiple merchants across multiple networks dumped into a mysql database on a php site. I keep running into the problem that some merchants have different size images, so i'll have one really large image next to a really small one. How do I fix this problem (I'm kinda new to php so please bear with). When I set an actual image size, some of the images are distorted. Thanks in advance...

  2. #2
    Newbie
    Join Date
    January 18th, 2005
    Posts
    46
    One way to do is to have each merchant in a separate directory (or sub-domain) and database (at least tables). Then customize the image size in the script for each merchant. That's what I do here: http://www.pricespread.com. Any better suggestion would definitely be welcome.

  3. #3
    ABW Ambassador AddHandler's Avatar
    Join Date
    January 19th, 2005
    Posts
    1,270
    Well if the image sizes are not too drastic.. you may want to consider not adding an image size at all... unless your loading 50-100 products per page.. it shouldn't slow it down much...

    just be sure and pick the largest image and design it around that..

    just an idea...

  4. #4
    Animal Lover
    Join Date
    January 18th, 2005
    Location
    oz
    Posts
    1,210
    I use CSS to resize images

    See this tutorial (spaces in the url)

    http : // www .bigbaer.com/css_tutorials/css.scale.image.html.tutorial.htm

    cheers,
    Oscar
    My DataFeed Scripts - php datafeed scripts for your site
    Shareasale datafeed scripts - to display Shareasale datafeeds
    Linkshare datafeed scripts - for multiple Linkshare merchants

  5. #5
    Member
    Join Date
    January 18th, 2005
    Location
    Brooklyn
    Posts
    118
    Quote Originally Posted by oscar
    I use CSS to resize images

    See this tutorial (spaces in the url)

    http : // www .bigbaer.com/css_tutorials/css.scale.image.html.tutorial.htm

    cheers,
    Oscar

    Thanks, I'll give it a try.

  6. #6
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    I'm dealing with this problem as we speak. I'm building a PHP image caching script that will download the images to my server on-demand and resize them using PHP's GD libraries. This way I can take the largest image from each merchant and resize them down to the proper thumbnail size.

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  7. #7
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    Quote Originally Posted by ssgupta
    One way to do is to have each merchant in a separate directory (or sub-domain) and database (at least tables). Then customize the image size in the script for each merchant. That's what I do here: http://www.pricespread.com. Any better suggestion would definitely be welcome.
    ssgupta,

    I just noticed most, if not all, of your 21"+ monitors are out of stock from TechDepot. Either they've having problems with the datafeed or you aren't updating your site often enough. Just thought I'd let you know.

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  8. #8
    Newbie
    Join Date
    January 18th, 2005
    Posts
    46
    Update needed.

  9. #9
    Newbie
    Join Date
    January 4th, 2006
    Location
    Berlin
    Posts
    41
    We typically import all the images from merchants using wget command and then reprocess them as we import using imagemagick, am not sure the reasons why but it seems when we were using gd_library we came across a few issues that were completely sorted using imagemagick.

    Hope that is of some help.

    Regards

  10. #10
    Crazy like a fox suzigeek's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,096
    Quote Originally Posted by Snib
    I'm dealing with this problem as we speak. I'm building a PHP image caching script that will download the images to my server on-demand and resize them using PHP's GD libraries. This way I can take the largest image from each merchant and resize them down to the proper thumbnail size.

    - Scott
    I've done this also on some sites. It seems to use alot of resources but I'm using this on smallish niche sites. I have the script insert a record into the database once the image is cached, on the next request the db is checked and if there's a value it grabs my local version.

    I thought about doing it with wget but it was easier for me to do the php thing since I can't wrap my head around wget right now.
    Suz~~GearGirl~~

  11. #11
    Member
    Join Date
    January 18th, 2005
    Posts
    87
    I am also using GD libraries to do this. Infact this is the only and best way that I have found doing it. It seems fast aswell.

    What my script does is when a visitor goes to my page with products on it will then display the images from the merchants sites and resize them automatically so they all show up on my site the same size. Because some of the images have big file sizes then I also take a copy of this resized image as a thumb nail image and it is automatically saved locally on my server.

    When somebody visitors that page again or another page that uses some of the same images then my script will pull the image from my server and not the merchants server. If the image doesn't exist on my server then it will take it from the merchants server.
    [url=www.gamesdash.com]Games Dash[/url] - listing many free online games that you can play.

  12. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. What Size Image(s) Do You Prefer (for Coupons)?
    By Geno Prussakov in forum Couponer's Corner
    Replies: 7
    Last Post: November 18th, 2008, 03:50 AM
  2. Image size
    By astro1 in forum WebMerge (Fourthworld.com)
    Replies: 2
    Last Post: October 2nd, 2004, 11:47 AM
  3. messing with image size in URL
    By nmjudy in forum Rakuten LinkShare - LS
    Replies: 4
    Last Post: September 22nd, 2004, 10:19 AM
  4. How to find an image's size over a URL?
    By DDs in forum Programming / Datafeeds / Tools
    Replies: 0
    Last Post: April 8th, 2004, 06:35 PM

Posting Permissions

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