diff --git a/admin/post-types/writepanels/variation-admin-html.php b/admin/post-types/writepanels/variation-admin-html.php
index 3e906381f5f..bbc061a5ef6 100644
--- a/admin/post-types/writepanels/variation-admin-html.php
+++ b/admin/post-types/writepanels/variation-admin-html.php
@@ -132,7 +132,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/woocommerce-core-functions.php b/woocommerce-core-functions.php
index b0fdc2bbe0e..ef94dcefa4f 100644
--- a/woocommerce-core-functions.php
+++ b/woocommerce-core-functions.php
@@ -36,6 +36,39 @@ function woocommerce_sanitize_taxonomy_name( $taxonomy ) {
return str_replace( array( ' ', '_' ), '-', strtolower( $taxonomy ) );
}
+/**
+ * woocommerce_get_attachment_image_attributes function.
+ *
+ * @access public
+ * @param mixed $attr
+ * @return void
+ */
+function woocommerce_get_attachment_image_attributes( $attr ) {
+ if ( strstr( $attr['src'], 'woocommerce_uploads/' ) )
+ $attr['src'] = woocommerce_placeholder_img_src();
+
+ return $attr;
+}
+
+add_filter( 'wp_get_attachment_image_attributes', 'woocommerce_get_attachment_image_attributes' );
+
+
+function woocommerce_prepare_attachment_for_js( $response ) {
+
+ if ( isset( $response['url'] ) && strstr( $response['url'], 'woocommerce_uploads/' ) ) {
+ $response['full']['url'] = woocommerce_placeholder_img_src();
+ if ( $response['sizes'] ) {
+ foreach( $response['sizes'] as $size => $value ) {
+ $response['sizes'][ $size ]['url'] = woocommerce_placeholder_img_src();
+ }
+ }
+ }
+
+ return $response;
+}
+
+add_filter( 'wp_prepare_attachment_for_js', 'woocommerce_prepare_attachment_for_js' );
+
/**
* woocommerce_get_dimension function.
*
|