{"id":186,"date":"2024-09-08T18:48:00","date_gmt":"2024-09-08T22:48:00","guid":{"rendered":"\/blog\/?p=186"},"modified":"2024-09-08T13:07:10","modified_gmt":"2024-09-08T17:07:10","slug":"how-to-compress-a-jpg-file-to-100-kb-in-macos","status":"publish","type":"post","link":"\/blog\/how-to-compress-a-jpg-file-to-100-kb-in-macos","title":{"rendered":"How to compress a JPG file to 100 KB in MacOS?"},"content":{"rendered":"\n<p>To compress a JPG file to 100 KB on macOS, you can use built-in tools like <strong>Preview<\/strong>, or command-line tools such as <code>ImageMagick<\/code> or <code>ffmpeg<\/code>. Here\u2019s how you can do it using these different methods:<\/p>\n\n\n\n<p>Before we begin, we want to let you know you can use\u00a0<a href=\"https:\/\/www.xconvert.com\/compress-jpeg\">https:\/\/www.xconvert.com\/compress-jpeg<\/a>\u00a0to compress your JPG to 100KB online. You can choose\u00a0<code>Autoscale<\/code>\u00a0feature to keep the quality high while reducing file size to less than 100KB.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>Using Preview (Built-in macOS App)<\/strong><\/h3>\n\n\n\n<p>Preview is a built-in app on macOS that provides a simple way to compress images:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Open the Image in Preview:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Right-click on your JPG file and select <strong>Open With > Preview<\/strong>.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Export the Image:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to <strong>File > Export<\/strong>.<\/li>\n\n\n\n<li>In the dialog that appears, select <strong>JPEG<\/strong> as the format.<\/li>\n\n\n\n<li>Adjust the <strong>Quality<\/strong> slider while keeping an eye on the file size shown at the bottom of the dialog. Lower the quality until you reach around 100 KB.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Save the Compressed Image:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click <strong>Save<\/strong> to save the compressed file.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>Using <code>ImageMagick<\/code> on the Command Line<\/strong><\/h3>\n\n\n\n<p><code>ImageMagick<\/code> is a powerful command-line tool that can be used to compress and resize images. You need to install it first if you haven\u2019t already.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Install ImageMagick:<\/h4>\n\n\n\n<p>You can install ImageMagick using Homebrew (a package manager for macOS):<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Install Homebrew<\/strong> (if you don&#8217;t have it already):<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">   \/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\"<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Install ImageMagick:<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">   brew install imagemagick<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Compress the JPG File:<\/h4>\n\n\n\n<p>Once ImageMagick is installed, you can use the <code>convert<\/code> command to compress the image:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">convert your-image.jpg -quality 80 -resize 1024x768 compressed-image.jpg<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-quality 80<\/code>: Sets the image quality to 80%. Lower the number to reduce the size further.<\/li>\n\n\n\n<li><code>-resize 1024x768<\/code>: Resizes the image to a maximum of 1024&#215;768 pixels (adjust dimensions as needed).<\/li>\n<\/ul>\n\n\n\n<p>Repeat this process, lowering the quality or size until the image is under 100 KB.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>Using <code>ffmpeg<\/code> on the Command Line<\/strong><\/h3>\n\n\n\n<p><code>ffmpeg<\/code> is another powerful tool that can be used to compress images, but it must be installed first.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Install <code>ffmpeg<\/code>:<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Install ffmpeg using Homebrew:<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">   brew install ffmpeg<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Compress the JPG File:<\/h4>\n\n\n\n<p>Use the following command to compress the image:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">ffmpeg -i your-image.jpg -q:v 31 compressed-image.jpg<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-q:v 31<\/code>: Sets the quality for the output image. Higher values reduce the file size but may lower the quality. Adjust the value as needed.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>Checking the File Size<\/strong><\/h3>\n\n\n\n<p>After compressing the image, check the file size in Finder or use the command line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">ls -lh compressed-image.jpg<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Additional Tips:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Iterate to Find the Right Balance:<\/strong> You may need to adjust the quality multiple times to reach exactly 100 KB while retaining acceptable visual quality.<\/li>\n\n\n\n<li><strong>Batch Compression:<\/strong> If you have multiple images, you can use a script to automate the compression for all files in a directory.<\/li>\n<\/ul>\n\n\n\n<p>Featured photo by <a href=\"https:\/\/unsplash.com\/@alex_andrews?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash\">Alexander Andrews<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/black-rolleiflex-camera-grayscale-photo-A545KXf87jE?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash\">Unsplash<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To compress a JPG file to 100 KB on macOS, you can use built-in tools like Preview, or command-line tools such as ImageMagick or ffmpeg. Here\u2019s how you can do it using these different methods: Before we begin, we want to let you know you can use\u00a0https:\/\/www.xconvert.com\/compress-jpeg\u00a0to compress your JPG to 100KB online. You can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":187,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[10,13,9,8],"class_list":["post-186","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to-guides","category-tutorial","tag-compress-image","tag-compress-jpeg","tag-compress-jpg","tag-file-compress"],"_links":{"self":[{"href":"\/blog\/wp-json\/wp\/v2\/posts\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/wp-json\/wp\/v2\/comments?post=186"}],"version-history":[{"count":2,"href":"\/blog\/wp-json\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":189,"href":"\/blog\/wp-json\/wp\/v2\/posts\/186\/revisions\/189"}],"wp:featuredmedia":[{"embeddable":true,"href":"\/blog\/wp-json\/wp\/v2\/media\/187"}],"wp:attachment":[{"href":"\/blog\/wp-json\/wp\/v2\/media?parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/wp-json\/wp\/v2\/categories?post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/wp-json\/wp\/v2\/tags?post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}