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

Support for images in open recipie format #11

Open
costrouc opened this issue Nov 14, 2017 · 4 comments
Open

Support for images in open recipie format #11

costrouc opened this issue Nov 14, 2017 · 4 comments

Comments

@costrouc
Copy link

Was wondering if there was interest in including images in the recipie format? A simple way to do this would be to base64 encode to images.

@techhat
Copy link
Owner

techhat commented Nov 16, 2017

When I first came up with the idea of ORF, I had wanted to make it a zip file, like the open document formats that LibreOffice uses, so that media could be stored inside.

At the time we were looking at XML to follow suit with those formats, but YAML is much simpler to write and maintain. Then there's the problem with people making huge ORF files embedded with all sorts of binary data.

Eventually I tentatively decided that including URLs to media, rather than the actual media itself, would address these issues while still allowing for media to be associated with recipes.

@costrouc what are your thoughts on this?

@costrouc
Copy link
Author

costrouc commented Nov 16, 2017

I really appreciate the YAML format exactly because it is easy to read. Since urls are allowed you got me thinking that there is already support for images. Images can be included via a datauri. So I'd say it's solved.

I have looked at the documentation and spec. What field would be used for the media url? Can't find it.

Why I care is that I was considering to make an Polymer web component that would render these recipes (would be nice to have an image with each). Maybe will attempt this at a hackathon.

@DO1JLR
Copy link

DO1JLR commented Aug 20, 2021

Hello together

Any updates or progress here yet?

For my recipe collection, there are pictures showing the finished recipe as well as pictures of some of the steps.
I would find that cool to include in the openrecipeformat. But if that's not desired I guess I'll limit that to the html version of the recipe....

@telepath
Copy link

In the current definition, you can add notes to each ingredient, step or recipe. These are fields for free text, so you can add either a link to an image or an image as a datauri.

      notes:
        - https://upload.wikimedia.org/wikipedia/commons/5/56/Tiger.50.jpg

The open question is if you're supposed to format the link in a specific way. Two obvious methods come to mind, either HTML or Markdown. Markdown Links and images would fit quite well into the YAML format, as long as you quote the string:

      notes:
        - "![](https://upload.wikimedia.org/wikipedia/commons/5/56/Tiger.50.jpg)"

HTML would make redering a web page quite simple and can be included without quotes or in single qoutes (because double quotes are usually used for attributes):

      notes:
        - '<img src="https://upload.wikimedia.org/wikipedia/commons/5/56/Tiger.50.jpg" />'

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

4 participants