Images are not being displayed

Hi,

I am having issues with displaying images in H5P with Moodle 3.8. Even if I reuse Greeting Card (https://h5p.org/node/885) the image of earth does not get displayed. Console in the browser does not show any issues. Could you please help me to figure out what could be the problem?

papi Jo's picture

I have seen this happen at times... Try this: after uploading the Greeting Card activity, in edit mode, change the image (put a new image in). What happens?

The image shows up then. However, this does not solve my issue as I want to add some images the user wont be able to modify.

The image shows up if I do that. However, this does not solve my issue as I want to create content where user wont be able to modify some images.

The image shows up if I do that. However, this does not solve my issue as I want to create content where user wont be able to modify some images.

BV52's picture

Hi myny,

Other users can't modify the images, since you need to be on the editor to do this.

-BV

Sorry for duplicate comments. I cannot delete them now.

Anyways .. to make things clear I want to add some images which will be displayed in the content without the need of using the editor to add them.

papi Jo's picture

Ssorry, this not clear at all. Please explain.

I want to develop .h5p package that contains and displays images. The best example I found, is with Greeting Card. Inside the .h5p package there is an image (earth.jpg), but after installation, the image is not displayed. I have exactly the same issue. I found out that the image is added into Moodle file system. It is even in mdl_files table (Moodle database). I have a suspicion that in this table it is added to wrong 'filearea'. The 'filearea' says "editor" while I have noticed that images that are being displayed in other packages have two entries in mdl_files one with 'fileareal="editor" and other with 'filearea'="content" (this is the case for example in Collage example). The other packages display image if the image was added via the editor.

papi Jo's picture

@myny Thanks for the detailed explanation. Maybe the Greeting Card H5P content is not up-to-date and not a good starting point for developing a new content?