Link to an image on a web page

Asked by Oliver Vornberger on 2015-07-03

Redbook allows you to insert a static image from your local disc drive. The syntax is e.g. [""file:///D:\Bilder\jan"".jpg].

Often, you would like to insert an image from a webpage; the syntax could be e.g. [""http://www.vornberger.net/medien/jan.jpg""]

Would this be possible (in the near future) ?

-- Oliver

Question information

Language:
English Edit question
Status:
Solved
For:
RedNotebook Edit question
Assignee:
No assignee Edit question
Solved by:
Jendrik Seipp
Solved:
2015-07-03
Last query:
2015-07-03
Last reply:
2015-07-03

This question was reopened

Jendrik Seipp (jendrikseipp) said : #1

You're in luck, that already works:

[""http://www.vornberger.net/medien/jan"".jpg]

Jendrik Seipp (jendrikseipp) said : #2

You can even resize remote images:

[""http://www.vornberger.net/medien/jan"".jpg?200]

Oliver Vornberger (l-oliver) said : #3

Thanks Jendrik Seipp, that solved my question.

Oliver Vornberger (l-oliver) said : #4

That could now solve my weather problem, provided, I find a webservice, that - given a date - generates a weather symbol.

Jendrik Seipp (jendrikseipp) said : #5

Indeed, that would do the trick. You can specify the URL for the
webservice in a template and use the $date$ macro to insert the current
date when you insert the template. You can set the date format that the
webservice needs in the preferences. An example template could be
http://fictional-weather-api.com/$date$/california/image

Oliver Vornberger (l-oliver) said : #6

That would have been my next question: What is the $dateĀ§ macro ? What I need is a String, that I could concatenate to the (still to find) servers url and that evaluates to the current date.

Jendrik Seipp (jendrikseipp) said : #7

Try putting "Now: $date$." in a template and insert it. $date$ will
expand into the current date. The format for expansion can be set in the
preferences.

Oliver Vornberger (l-oliver) said : #8

OK. That works, HOWEVER: it is the current date ! Since I have to insert this macro with the link to the web service by hand into a lot of days, it would be important to have a macro that expands to the day you are editing.

Jendrik Seipp (jendrikseipp) said : #9

Indeed, that it where the macro system would come in handy...

Oliver Vornberger (l-oliver) said : #10

Sorry. Did you say "the macro system would come in handy". It expands to the current data, and not the date of the day the macro is inserted, right ? And that doesn't help, right ?

Best Jendrik Seipp (jendrikseipp) said : #11

You're right. What I meant is the plugin system that would allow
arbitrary plugin macros. Currently, the only supported macro is $date$
and it's not very useful for you.

Oliver Vornberger (l-oliver) said : #12

Thanks Jendrik Seipp, that solved my question.