How do I reduce size of photo for posting on the internet?

My web forum does not allow my large pixel size photos. How do I reduce their data size?

iPhone 4S, iOS 6, Motorola Elite Silver bluetooth ear

Posted on Oct 23, 2016 7:01 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 23, 2016 1:58 PM

For a small handful, you can Applications -> Preview -> Tools -> Adjust Size. You could even select a lot of images, open them all in one Preview session, select the all the images inside Preview and use Adjust Size on all of them.


It is possible to use an Applescript to rescale images, using the built-in "Image Events". I found the following script on-line, modified it slightly and created a drag and drop app to resize images for a web page I maintain

-- save in Script Editor as Application
-- drag files to its icon in Finder

on open some_items
    repeat with this_item in some_items
        try
            rescale_and_save(this_item)
        end try
    end repeat
end open


to rescale_and_save(this_item)
    tell application "Image Events"
        launch
        set the target_width to 184
        set the special_width_height to 240
        -- open the image file
        set this_image to open this_item
       
        set typ to this_image's file type
       
        copy dimensions of this_image to {current_width, current_height}
        if current_width is not equal to special_width_height and current_height is not equal to special_width_height then
            if current_width is greater than target_width then
                scale this_image to size target_width
            else
                -- figure out new height
                -- y2 = (y1 * x2) / x1
                set the new_height to (current_height * target_width) / current_width
                scale this_image to size new_height
            end if
        end if
       
        tell application "Finder" to set new_item to ¬
            (container of this_item as string) & "scaled." & (name of this_item)
        save this_image in new_item as typ
       
    end tell
end rescale_and_save

You can Google search "batch image resizer Mac" and find lots of additional examples for resizing images on a large scale.

5 replies
Question marked as Top-ranking reply

Oct 23, 2016 1:58 PM in response to HJohnK

For a small handful, you can Applications -> Preview -> Tools -> Adjust Size. You could even select a lot of images, open them all in one Preview session, select the all the images inside Preview and use Adjust Size on all of them.


It is possible to use an Applescript to rescale images, using the built-in "Image Events". I found the following script on-line, modified it slightly and created a drag and drop app to resize images for a web page I maintain

-- save in Script Editor as Application
-- drag files to its icon in Finder

on open some_items
    repeat with this_item in some_items
        try
            rescale_and_save(this_item)
        end try
    end repeat
end open


to rescale_and_save(this_item)
    tell application "Image Events"
        launch
        set the target_width to 184
        set the special_width_height to 240
        -- open the image file
        set this_image to open this_item
       
        set typ to this_image's file type
       
        copy dimensions of this_image to {current_width, current_height}
        if current_width is not equal to special_width_height and current_height is not equal to special_width_height then
            if current_width is greater than target_width then
                scale this_image to size target_width
            else
                -- figure out new height
                -- y2 = (y1 * x2) / x1
                set the new_height to (current_height * target_width) / current_width
                scale this_image to size new_height
            end if
        end if
       
        tell application "Finder" to set new_item to ¬
            (container of this_item as string) & "scaled." & (name of this_item)
        save this_image in new_item as typ
       
    end tell
end rescale_and_save

You can Google search "batch image resizer Mac" and find lots of additional examples for resizing images on a large scale.

Oct 23, 2016 2:33 PM in response to BobHarris

Poster?


I assumed you wanted to reduce the file size of the image. If you want to reduce the dimensions of the image, BobHarris has the way to go. Note: Many web pages change the dimensions of the image in the web page source.


What is the file type of the image? Jpeg is the best for images.

I assume you are using your iPhone 4s.

For the mac, display the image in preview. Take a screen image of the picture. This result will be in jpeg and compressed.


------------------------------------------------------------------------


I was going to add to my post to avoid using preview to make adjustments for the web.


Crop doesn't work for the web. Preview makes notations about the crop, but doesn't actually adjust the image.


For resizing, Preview adjusts the dimensions of the image as far as I can tell, I would think you would want to reduce the file size of the image. I'd guess the image is jpeg.


I see:

User uploaded file


For web work, I found that my iPhone 4s running 7.1.2 is easier to use than the mac applications I am familiar with. Preview is a mine field.


R

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I reduce size of photo for posting on the internet?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.