Comic Resolution in json metadata.

Need the mods or admins to do something for you? Post here. Read the "About" post first.

Moderators: Moderators General, Prelates, Magistrates

lordloh
Posts: 2
Joined: Sun Aug 28, 2016 7:10 pm UTC

Comic Resolution in json metadata.

Postby lordloh » Sun Aug 28, 2016 7:27 pm UTC

Hi,

I am unable to find a previous discussion on this after a cursory search. Can the x y resolution of the image files be made a part of the info.0.json metadata? This would let one embed the comic with a width & height attribute. I believe that this improves browser page load performance[http://webmasters.stackexchange.com/questions/68491/specifying-image-dimensions-to-improve-browser-performance] [[url][/url]].

I am putting xkcd on my 404 pages and thought it would be good include width & height - see - https://bharath.lohray.com/nonexistant. The code may be found at - https://github.com/lordloh/xkcd-dl

lordloh
Posts: 2
Joined: Sun Aug 28, 2016 7:10 pm UTC

Re: Comic Resolution in json metadata.

Postby lordloh » Sun Sep 04, 2016 1:06 am UTC

https://github.com/lordloh/xkcd-dl - I have included this feature in my latest commit. My xkcd downloader script analyzes the image to get the width and height. These are specified as width and height attribute in the img tag. However, I would love to roll this back if the width and height were available in the info.0.json file. This would also help people without a server backed to embed without suffering page rendering penalty.

See it in action at - https://bharath.lohray.com/weblog/non-existant and view source.


Return to “Site/Forum issues”

Who is online

Users browsing this forum: No registered users and 7 guests