resize image with javascript so that user have easer upload

Discussion in 'PHP' started by mehdiali2, Sep 20, 2009.

  1. #1
    Hi my friend
    i have a section that user upload their image.
    but i want to resize image (to 50k) with javascript so that they have easier upload(because of internet low speed)

    thank you
     
    mehdiali2, Sep 20, 2009 IP
  2. Oli3L

    Oli3L Active Member

    Messages:
    207
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    70
    #2
    resize the file's size of the image's resolution?
     
    Oli3L, Sep 21, 2009 IP
  3. mehdiali2

    mehdiali2 Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yes. image file size
     
    mehdiali2, Sep 21, 2009 IP
  4. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #4
    If you use Javascript, then the actual image will not be resized. You should look at PHP image resize functions available widely online.
     
    ThePHPMaster, Sep 21, 2009 IP
  5. mehdiali2

    mehdiali2 Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i can't use php , because i want to resize images in user machine so that the image file size decrease and they upload their image easier.
    he has a image that it's size is 2 Mb and want to upload it. the image must, first, convert to 50 Kb file and then upload
     
    mehdiali2, Sep 22, 2009 IP
  6. TheOnly92

    TheOnly92 Peon

    Messages:
    17
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Perhaps you can try to ask them to compress first before uploading?
     
    TheOnly92, Sep 23, 2009 IP
  7. AdscendJeremy

    AdscendJeremy Peon

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I don't think this is possible.
     
    AdscendJeremy, Sep 23, 2009 IP
  8. elitasson

    elitasson Member

    Messages:
    49
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    48
    #8
    You can't do it with javascript.
     
    elitasson, Sep 23, 2009 IP
  9. NatalicWolf

    NatalicWolf Peon

    Messages:
    262
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #9
    This is possible perhaps if you used java...but not through javascript...sorry.

     
    NatalicWolf, Sep 23, 2009 IP
  10. Martinoes

    Martinoes Peon

    Messages:
    110
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    This is not possible in JavaScript !

    U can use something like ImageHelper to resize images in PHP.
     
    Martinoes, Sep 24, 2009 IP