When an image style derivative image hasn't been rendered yet, it doesn't show up (noticed on mobile version).
I.e. JS trying to load sites/[FOLDER]/files/styles/[STYLE]/public/myimage.jpg gives an error, even though the file should be rendered when the url is requested.

Perhaps caused by the .htaccess logic?

Comments

svendecabooter’s picture

Version: » 7.x-1.x-dev
Status: Active » Fixed
discipolo’s picture

just tried with git checkout. i am still recieving following errors in dblog

Unable to generate the derived image located at public://styles/thumbnail/public/default_images/defaultcard.r.png.

svendecabooter’s picture

Status: Fixed » Active
cartagena’s picture

just started getting this message in dblog...I updated Rules and Token modules a couple weeks ago...I'm not a programmer so I don't know if there would be any connection. I do document everything I do and prior to that update, nothing else had changed for quite some time.

digitaldonkey’s picture

This fix wont work on sites protected by http auth requireing a user/password

I fixed it like this:

--- a/sites/all/modules/responsive_images/responsive_images.field.inc
+++ b/sites/all/modules/responsive_images/responsive_images.field.inc
@@ -120,11 +120,22 @@ function responsive_images_field_formatter_view($entity_type, $entity, $field, $
     $small_style_path = image_style_path($set->small_style, $item['uri']);
     $large_style_url = image_style_url($set->large_style, $item['uri']);
     $large_style_path = image_style_path($set->large_style, $item['uri']);
+    
     if (!file_exists($small_style_path)) {
-      drupal_http_request($small_style_url);
+
+      // tho@wergehthin fix for Auth
+      if (isset($_SERVER['PHP_AUTH_USER']) ){
+        $small_style_url = str_replace('http://', 'http://'.$_SERVER['PHP_AUTH_USER'].':'.$_SERVER['PHP_AUTH_PW'].'@', $small_style_url);
+      }
+        dsm($small_style_url);
+
+      drupal_http_request( $small_style_url );
     }
     if (!file_exists($large_style_path)) {
-      drupal_http_request($large_style_url);
+      if (isset($_SERVER['PHP_AUTH_USER']) ){
+        $large_style_url = str_replace('http://', 'http://'.$_SERVER['PHP_AUTH_USER'].':'.$_SERVER['PHP_AUTH_PW'].'@', $large_style_url);
+      }
+      drupal_http_request( $large_style_url );
     }
     /* End workaround */
 
@@ -139,4 +150,4 @@ function responsive_images_field_formatter_view($entity_type, $entity, $field, $