diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php
index 20d1361..a11e3a0 100644
--- a/wp-admin/includes/file.php
+++ b/wp-admin/includes/file.php
@@ -563,7 +563,7 @@ function unzip_file($file, $to) {
 		return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
 
 	// Unzip can use a lot of memory, but not this much hopefully
-	@ini_set('memory_limit', '256M');
+	@ini_set('memory_limit', apply_filters( 'admin_memory_limit', '256M' ));
 
 	$needed_dirs = array();
 	$to = trailingslashit($to);
diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php
index 03e7144..716031b 100644
--- a/wp-admin/includes/image-edit.php
+++ b/wp-admin/includes/image-edit.php
@@ -391,7 +391,7 @@ function image_edit_apply_changes($img, $changes) {
 
 function stream_preview_image($post_id) {
 	$post = get_post($post_id);
-	@ini_set('memory_limit', '256M');
+	@ini_set('memory_limit', apply_filters( 'admin_memory_limit', '256M' ));
 	$img = load_image_to_edit( $post_id, $post->post_mime_type, array(400, 400) );
 
 	if ( !is_resource($img) )
@@ -496,7 +496,7 @@ function wp_save_image($post_id) {
 	$return = new stdClass;
 	$success = $delete = $scaled = $nocrop = false;
 	$post = get_post($post_id);
-	@ini_set('memory_limit', '256M');
+	@ini_set('memory_limit', apply_filters( 'admin_memory_limit', '256M' ));
 	$img = load_image_to_edit($post_id, $post->post_mime_type);
 
 	if ( !is_resource($img) ) {
diff --git a/wp-includes/media.php b/wp-includes/media.php
index 041c4e5..82dd11f 100644
--- a/wp-includes/media.php
+++ b/wp-includes/media.php
@@ -250,7 +250,7 @@ function wp_load_image( $file ) {
 		return __('The GD image library is not installed.');
 
 	// Set artificially high because GD uses uncompressed images in memory
-	@ini_set('memory_limit', '256M');
+	@ini_set('memory_limit', WP_MEMORY_LIMIT);
 	$image = imagecreatefromstring( file_get_contents( $file ) );
 
 	if ( !is_resource( $image ) )
@@ -1405,4 +1405,4 @@ function wp_oembed_add_provider( $format, $provider, $regex = false ) {
 	require_once( ABSPATH . WPINC . '/class-oembed.php' );
 	$oembed = _wp_oembed_get_object();
 	$oembed->providers[$format] = array( $provider, $regex );
-}
\ No newline at end of file
+}
