Quantcast
Channel: User Prayag Verma - Stack Overflow
Viewing all articles
Browse latest Browse all 39

Answer by Prayag Verma for How to resize thumbnail size without using js in blogger?

$
0
0

Using on-the-fly image resizing services would be a way forward in this scenario

Google has an undocumented endpoint used for on-the-fly image resizing. As explained in https://czm.io/posts/2013/04/google-image-resizer/, that endpoint is as follows -

Base URL

https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy

Parameters:

  • url: original image URL

  • container: must be “focus”

  • refresh: time (in seconds) to cache it on G’s servers

  • resize_w: width in pixels

  • resize_h: height in pixels You can either specify both

  • resize_* parameters or just one.

For making sure that you only resize external images, you will need to set up a Blogger conditional for testing if the thumbnail exists or not (data:post.thumbnailUrl is always non-existent for external images excluding post containing Youtube videos)

As Google's endpoint is undocumented, we can't be sure about its availability in future (Due to the fact that this is related to Google+ social network which is itself closing down in April 2019). There are multiple alternatives for on-the-fly image resizing services which are both paid (like https://kraken.io/docs/image-resizing, https://www.imgix.com/) and self-hosted (like https://github.com/jimmynicol/image-resizer)


Viewing all articles
Browse latest Browse all 39

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>