Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firesize no longer up. #31

Closed
tewen opened this issue Jan 11, 2016 · 3 comments
Closed

Firesize no longer up. #31

tewen opened this issue Jan 11, 2016 · 3 comments

Comments

@tewen
Copy link

tewen commented Jan 11, 2016

It appears that firesize.com is no longer up and resizing images. You can see this on the sample page for mnml: here. I first noticed on my mnml blog pearoftheweek.com. Thanks

@vickychijwani
Copy link

Same issue here. I ended up getting rid of the firesize and using a pure CSS solution for center-cropping, described here on StackOverflow (the 2nd one). Note that you need to add background-size: cover; to the .center-cropped CSS for it to work correctly. You can see it working correctly on my blog. So we end up with:

// partials/loop.hbs
function homepagePostThumbnail (imgUrl) {
    thumbnailContainer.innerHTML = '<div class="center-crop" style="background-image: url(\'' + imgUrl + '\')">'
        + '<img src="'+imgUrl+'" height="150" alt="{{title}}" /></div>';
}
/* assets/css/main.css */
.post-thumbnail .center-crop {                                                                                                                       
  max-width: 250px;                                                                                                                                  
  height: 150px;                                                                                                                                     
  background-position: center center;                                                                                                                
  background-repeat: no-repeat;                                                                                                                      
  background-size: cover;                                                                                                                            
  overflow: hidden;                                                                                                                                  
}                                                                                                                                                    

/* Set the image to fill its parent and make transparent */                                                                                          
.post-thumbnail .center-crop img {                                                                                                                   
  min-height: 100%;                                                                                                                                  
  min-width: 100%;                                                                                                                                   
  /* IE 8 */                                                                                                                                         
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";                                                                                  
  /* IE 5-7 */                                                                                                                                       
  filter: alpha(opacity=0);                                                                                                                          
  /* modern browsers */                                                                                                                              
  opacity: 0;                                                                                                                                        
}                                                                                                                                                    

This workaround is obviously trading-off some bandwidth and page load speed but I can live with that.

@curiositry
Copy link
Owner

Thanks for the heads up @tewen and @vickychijwani — I should have seen this coming when Assembly folded, since Firesize wasn’t profitable yet.

There aren’t any good hosted alternatives for Firesize, so for now I’ve just commented out that part and added a 160px max-height. I hope to find another on-the-fly image resizing API, or host my own, soon — or else go for a solution like Vicky’s.

Sorry for the outage :)

P.S. For anyone who’s hosting on Heroku, it seems if you push an updated theme without updating the theme's version number in package.json, it won’t change; took me a few pushes to figure this out, but I’ve bumped the version number so here so it shouldn’t be a problem.

@tewen
Copy link
Author

tewen commented Jan 17, 2016

@curiositry Thanks so much. Love the responsivity. You guys are doing great stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants