Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Resizing images for my website

Options
  • 04-10-2013 9:53am
    #1
    Registered Users Posts: 64 ✭✭


    Hi All,

    I have developed a site that allows members to post ads on to it. However i have recently ran into problems where my server won’t allow the upload of images that exceed 2mb. Has anyone come across this problem before. I was thinking maybe there is a open sources software that i can plug into my site that automatically resizes images before uploading. Any advise is much appreciated?

    Regards

    Pentax:)


Comments

  • Registered Users Posts: 6,392 ✭✭✭AnCatDubh


    Need more info - How is your website doing the upload?

    ftp, online via a webuploader, and if so what product?

    If it was a php based uploader (site in drupal or something like it) then there is a setting to do with the max size to accept from an upload/post. If a php thing, then see here for a description of the problem as it would apply to drupal including the settings.

    (of course the above might be nonsense if it isn't a php thing but you'd need to elaborate a little on what the context of the problem might be)

    More difficult to do client side unless you are doing a specific client uploader and have controls to do it.

    I'm curious though, for an ads based site, why would you be allowing large images like that to be uploaded in the first place? Presumably you aren't going to render those back in web pages.

    Anyhow, hope you get sorted.


  • Registered Users Posts: 64 ✭✭Pentax


    Hi AnCatDubh,

    Thanks for the response.

    Pictures are loaded from within the site. it may be best if i send you the URL to the site but I'm afraid that may be against the rules of the site.

    It’s not that I want large images for the site but everyone seems to us large resolution pictures these days. If I Could get my site to automatically reduce the megabit size of images uploaded that would solve my problem.

    The site is written in PHP and I’m using MySQL for the database. Is it possible that picture restriction is set by the server that I'm renting.

    I would send you a link to my site but i think thatsagainst the rules of this site.

    Pentax


  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    Check the limits in the php.ini of your server (assuming you have a dedicated server):

    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 40M
    ; Must be greater than or equal to upload_max_filesize
    post_max_size = 40M


  • Moderators, Technology & Internet Moderators Posts: 11,011 Mod ✭✭✭✭yoyo


    Graham wrote: »
    Check the limits in the php.ini of your server (assuming you have a dedicated server):

    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 40M
    ; Must be greater than or equal to upload_max_filesize
    post_max_size = 40M

    If not, you could always just use your .htaccess file to do the same thing. I've done it before with success :) . May be server dependant.

    Nick


  • Registered Users Posts: 1,109 ✭✭✭Skrynesaver


    imagemagick provides a very flexible command line convert tool


  • Advertisement
  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    imagemagick provides a very flexible command line convert tool

    I don't think imagemagick would help here. If the file is too big to upload, it's not going to reach imagemagick on the server


  • Registered Users Posts: 64 ✭✭Pentax


    Hi All,

    Does anyone know how daft or myhome manage to allow you to upload large photographs of properties. I am assuming that they take your picture and internal within the site reduce the resolution of the picture and then post it to the site. This is the thing that I am trying to work towards. Ideally I would block people from uploading pictures that are too large to begin with but I'm afraid that this will just push people away.

    Can any one help.

    Pentax:D


  • Technology & Internet Moderators Posts: 28,792 Mod ✭✭✭✭oscarBravo


    Did you check the upload_max_filesize as suggested by Graham above? If you can change that, change it. If you can't change it, see if the server owner will change it. If not, you probably can't do anything about it.


  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    Pentax wrote: »
    Hi All,

    Does anyone know how daft or myhome manage to allow you to upload large photographs of properties. I am assuming that they take your picture and internal within the site reduce the resolution of the picture and then post it to the site. This is the thing that I am trying to work towards. Ideally I would block people from uploading pictures that are too large to begin with but I'm afraid that this will just push people away.

    Allow uploads with a larger size limit then resize them on the server with something like imagemagick before you save them anywhere.

    You may need to change some php limits to allow this as mentioned previously.


  • Registered Users Posts: 2,462 ✭✭✭mayo.mick


    I've installed the smush-it plugin on my (wordpress) site. Although as standard I upload max 1024pix the plugin still reduces the file size, saves both disk space and improves page load speeds. It also gives the option of reducing existing photos in the database.


  • Advertisement
Advertisement