<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Post image maximum size</title>
		<link>https://legacy.forums.gravityhelp.com/topic/post-image-maximum-size</link>
		<description>Gravity Support Forums Topic: Post image maximum size</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 03:26:13 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/post-image-maximum-size" rel="self" type="application/rss+xml" />

		<item>
			<title>Brett Weaver on "Post image maximum size"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-image-maximum-size#post-49564</link>
			<pubDate>Thu, 16 Feb 2012 00:34:22 +0000</pubDate>
			<dc:creator>Brett Weaver</dc:creator>
			<guid isPermaLink="false">49564@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Apparently between GF updates and WP updates something got sorted out, because I just tried the exact code above provided by Jimbo and my &#34;large&#34; image uploaded via Gravity Forms can be controlled with the Settings -&#38;gt; Media Large Size Max Width setting.  &#60;/p&#62;
&#60;p&#62;For instance, I set the Max width in WordPress settings to 640.  I then uploaded a 1624x1080 image that was 607kb and it ended up being 640x425 at 147kb (and I also have the medium and small sized images crunched by WP.&#60;/p&#62;
&#60;p&#62;I was glad this method worked, because I was NOT able to get a plugin solution to work.  I tried &#34;Imsanity&#34; which works great going directly through the media library or post upload, but not through GF forms.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Brett Weaver on "Post image maximum size"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-image-maximum-size#post-35371</link>
			<pubDate>Thu, 15 Sep 2011 00:17:43 +0000</pubDate>
			<dc:creator>Brett Weaver</dc:creator>
			<guid isPermaLink="false">35371@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I found and tried the same function code as above by jimbo.  It WOULD do exactly what I need, which is delete the original file and rename the 'large' file to the original file's name so that any WP gallery links, etc would still find an image.  &#60;/p&#62;
&#60;p&#62;However, when I upload images via the GF form (and BTW this is on a MU network site), the image gets put in /2011/07/filename.jpg every time.  This is September so they should be uploading to /2011/09/filename.jpg.  The function above finds the original file and deletes it (not sure why), but the $large_image_location returns the /2011/09 directory (which it seems it should), but there's no file there because it got uploaded to /07.  &#60;/p&#62;
&#60;p&#62;Feels like a bug to me, but I may not be understanding how GF handles uploads.&#60;/p&#62;
&#60;p&#62;Thanks for any input.&#60;br /&#62;
Brett
&#60;/p&#62;</description>
		</item>
		<item>
			<title>designkitty on "Post image maximum size"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-image-maximum-size#post-28815</link>
			<pubDate>Wed, 29 Jun 2011 19:39:02 +0000</pubDate>
			<dc:creator>designkitty</dc:creator>
			<guid isPermaLink="false">28815@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Jimbo, I needed to resize image after upload too, this is what I did : scales to max width 600 ( for my needs - customize where needed )&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.chopapp.com/#n9bqd41c&#34; rel=&#34;nofollow&#34;&#62;http://www.chopapp.com/#n9bqd41c&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jimbo on "Post image maximum size"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-image-maximum-size#post-25932</link>
			<pubDate>Thu, 19 May 2011 15:53:59 +0000</pubDate>
			<dc:creator>jimbo</dc:creator>
			<guid isPermaLink="false">25932@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey Carl, I found this piece of code which does the trick but doesn't keep the aspect ratio of the image. It crops it to the size ( large: max height: 500px,  max width: 800px) it doesn't keep the aspect ratio. Can You please help?&#60;/p&#62;
&#60;p&#62;Hey all,&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function replace_uploaded_image($image_data) {
    // if there is no large image : return
    if (!isset($image_data[&#38;#39;sizes&#38;#39;][&#38;#39;large&#38;#39;])) return $image_data;

    // paths to the uploaded image and the large image
    $upload_dir = wp_upload_dir();
    $uploaded_image_location = $upload_dir[&#38;#39;basedir&#38;#39;] . &#38;#39;/&#38;#39; .$image_data[&#38;#39;file&#38;#39;];
    $large_image_location = $upload_dir[&#38;#39;path&#38;#39;] . &#38;#39;/&#38;#39;.$image_data[&#38;#39;sizes&#38;#39;][&#38;#39;large&#38;#39;][&#38;#39;file&#38;#39;];

    // delete the uploaded image
    unlink($uploaded_image_location);

    // rename the large image
    rename($large_image_location,$uploaded_image_location);

    // update image metadata and return them
    $image_data[&#38;#39;width&#38;#39;] = $image_data[&#38;#39;sizes&#38;#39;][&#38;#39;large&#38;#39;][&#38;#39;width&#38;#39;];
    $image_data[&#38;#39;height&#38;#39;] = $image_data[&#38;#39;sizes&#38;#39;][&#38;#39;large&#38;#39;][&#38;#39;height&#38;#39;];
    unset($image_data[&#38;#39;sizes&#38;#39;][&#38;#39;large&#38;#39;]);
    return $image_data;}
    add_filter(&#38;#39;wp_generate_attachment_metadata&#38;#39;,&#38;#39;replace_uploaded_image&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Post image maximum size"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-image-maximum-size#post-25930</link>
			<pubDate>Thu, 19 May 2011 15:12:54 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">25930@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Right now there is not a way, but we can look into adding an option so that the image is deleted immediately rather than stored with the entry data.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jimbo on "Post image maximum size"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-image-maximum-size#post-25928</link>
			<pubDate>Thu, 19 May 2011 15:08:38 +0000</pubDate>
			<dc:creator>jimbo</dc:creator>
			<guid isPermaLink="false">25928@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Just what I needed. Is there a way to automatically delete the image from gravity image folder? :D
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Post image maximum size"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-image-maximum-size#post-25921</link>
			<pubDate>Thu, 19 May 2011 14:54:31 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">25921@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;When you say original image are you referring to the original image size in the Media Library or the original image stored on the server by Gravity Forms? Because Gravity Forms stores it's file separate from the Media Library.  So you can delete Gravity Forms copy of the file and it won't impact the Media Library.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jimbo on "Post image maximum size"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-image-maximum-size#post-25915</link>
			<pubDate>Thu, 19 May 2011 13:32:37 +0000</pubDate>
			<dc:creator>jimbo</dc:creator>
			<guid isPermaLink="false">25915@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is there any progress on this problem? I need this also. The original image is taking to many space on the server especially if people are puting up 2 MB photos. Is there any way to somehow delete the original image and leave the optimized ones instead?! &#60;/p&#62;
&#60;p&#62;Cheers!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hamedhemmati on "Post image maximum size"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-image-maximum-size#post-24338</link>
			<pubDate>Wed, 27 Apr 2011 17:12:31 +0000</pubDate>
			<dc:creator>hamedhemmati</dc:creator>
			<guid isPermaLink="false">24338@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks guys I will try to look into this myself as well and see if I can figure something out.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Post image maximum size"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-image-maximum-size#post-24259</link>
			<pubDate>Wed, 27 Apr 2011 12:05:26 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">24259@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;We will have to look into this and see what theMedia Manager is doing differently.  Right now it isn't an option, the original size is stored as the original size.  The Media Manager than resizes the image to the appropriate media library sizes based on your settings.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
