tantaman / strut

Strut - An Impress.js and Bespoke.js Presentation Editor
http://strut.io
GNU Affero General Public License v3.0
1.82k stars 486 forks source link

Images not visible in presentation mode. #266

Closed jbrask closed 1 year ago

jbrask commented 10 years ago

Hi There,

First of all, thanks for writing Strut - it's awesome! :)

I use Strut for scientific presentations, and it is important for me to be able to run offline, as one cannot rely on internet access being available when visiting other research groups etc. Hence not being able to use local image files is a very strong limitation.

I tried a build from the latest version, because I thought this issue might have been solved https://github.com/tantaman/Strut/issues/235 .

And it does seem that images can be added now, without uploading to Imgur. However, although the pictures are visible in the slide editor, they do not show up in presentation mode. Also, when copy pasting an image which has previously been added, the original vanishes from the editor upon pasting of the copy.

I am running Strut in Google Chrome on Ubuntu 12.04.

tantaman commented 10 years ago

Ok. So I'm assuming you cloned the latest from master and that is where you are having these issues?

Could you inspect your presentation and tell me what URL it is using when it tries to display the images?

jbrask commented 10 years ago

Yes, exactly.

When I insert an image (this was a png), the URL is of this form: blob:null/48553be2-6ce6-46df-a3ef-....

In addition to what I mentioned above, the inserted image does also not immediately show up on the slide in the editor. It shows up in the overview of slides on the left, and after switching to another slide and then back to the original, it shows up on the slide in the editor as well.

By the way, when I first start up Strut, Chrome gives me this warning "[the website] wants to permanently store large data on your local computer".

I've tried running the same in Firefox. There the images do show up in presentation mode. The strange behaviour of not immediately showing up on the slide is reproduced though.

tantaman commented 10 years ago

The newest version of Strut is switching to use the Filesystem API (in Chrome) or IndexedDB (in Firefox) to save presentations and their associated media. There are still some issues to be worked out with this approach.

The "warning" is just a request to get permission to use those APIs to save the presentations. If you give the app permission I'd imagine that Chrome would behave correctly. Firefox and Safari will still have problems, however.

jbrask commented 10 years ago

I did try to allow - even with the permission I have the same problem.

cokelly commented 10 years ago

Likewise on this. I get the 'blob:' code as the upload location and the image doesn't come up. Permissions given. This occurs on both Firefox and Chrome (on Fedora 20).

tantaman commented 10 years ago

alright. I figured out what the issue is, thanks for bringing it up.

tantaman commented 10 years ago

For now you can use the production branch as that doesn't have any experimental features and will work fine. https://github.com/tantaman/Strut/tree/production

cokelly commented 10 years ago

Hi there. An alternative, as I discovered, is simply to enter the location into the text box.

So (in windows) something like "file:///My Documents/jbloggs/blah/photo.jpeg".