Password protected page does not show images

Hi everyone, I’m new to this community. First of all thanks to the Sparkle team for building such an amazing application! I have a little problem, password protected pages after posting don’t show images, they always display with a “?” even changing the file format. Anyone have any idea why?
Thanks in advance, Davide

Hello @Davide, welcome!

Since in general we don’t have a report of this being an issue, I’d start with looking into your web host setup. What version of PHP does your web host use? Sparkle requires at least PHP 5.6, though that’s also obsolete so at least PHP 7 or later is recommended.

Hi Duncan! It uses php 8.0

https://www.allegromolto.it/login-utente.html

user: mozzate
pass: musici

Thanks. That’s odd, might be best if you send us the project file so we can take a look.

1 Like

perfect, how do i send the file? Thank you very much, you are very kind!

The project file is the file that’s open in Sparkle, a file with .sparkle extension somewhere on your Mac. The easiest way to send it is using wetransfer.com to feedback@sparkleapp.com

Hi, unfortunately the problems have increased. Yesterday afternoon I tried to change the hosting service by choosing linux hosting (previously I had a hosting with wordpress installed) but the problems have not changed, in the password protected pages the images were not displayed, but any other component yes, whether they were animations, audio player, everything was displayed. I tried to insert an image gallery and only the gallery worked but without uploading the images. So, I admit my profound ignorance on the subject, I changed the hosting service again and I chose hosting windows: from that moment it does not upload any more images and now I am desperate because I made two expensive changes in one day and it didn’t help. . At this point I would like to understand if the problem is hosting and if Linux is better. I rely on Aruba.

now the site no longer displays images:

www.allegromolto.it

Thanks in advance for your availability, good job,
David

@Davide, I just took a quick look and I see your logo is in webp format. Could that be the issue?
The webp image format is not yet universally accepted so just try to upload your logo in png or jpg format and see what happens…

Also : Are you Publishing your website? or are you manually uploading it via FTP?

Hello.

This is really very strange. The missing image is a PNG, but only the [?] is displayed.

If you call the image directly, it is displayed.

To investigate this from a distance is very difficult.
Maybe Duncan and his team know more about this.

Mr. F.

Thank you! I solved the first problem, the images in webp did not open them, I converted and it works. However, the images of the pages in php, the password protected page, still do not work. the format is png, as it was previously when I created the post.

https://www.allegromolto.it/login-utente.html

user: mozzate
pass: musica

Oh you got an IIS hosting server. I never touch them because their proprietary take on things means headaches for use designers!

So the link you have given is not loading other then a 404 message…

hi, I corrected the post link, now it should work. In any case, to enter, go to the home of the site and click on the image, you will have to find the login window

Mmmm… Why do your image end in “.php”? That is most likely the issue.
I have never seen images ending in the file format “.php”.

This is the error being thrown.
You might need to talk to Duncan again. This might be a hosting issue?..

Thanks, I hadn’t noticed. As always, I uploaded the png image to sparkle and then published. This conversion is not my work … I have tried many combinations, with other formats (png, jpg, tiff, btmp) but the result is always the same. I have to build the site within a couple of weeks and I need to fix this as soon as possible. The images will be essential for children! :slight_smile:

Sorry I’m not quite sure about all the back and forth, the code Sparkle generates is correct, we have tens of thousands of customers and quite a few using password protection, this is an isolated issue with the web host, and as mentioned we will diagnose once we are able to test it.

Yes Microsoft IIS servers are misconfigured for webp images (but also svg, woff and woff2), they need to be properly configured as per this thread:

Yes it is correct for images in password protected pages to have a .php file extension, that’s because the images too are password protected and will only be loaded if the user is properly authenticated. I’d encourage people who are not familiar with code to trust Sparkle is doing the right thing.

1 Like

Ohhh, I know a bit about code but have learnt something new. I wasn’t aware that an image could be assigned a “.php” extension, but it is clever though seeing how it is also being protected behind a “password protected wall”.

I trust!!! :slight_smile:

Dear Duncan,

I exposed my problem to the company that manages the hosting of the site, this is their answer (I report it in Italian so as not to alter the content)
I did not understand what he should do.
Thank you in advance for your attention, good job, Davide

" Gentile cliente,

da indagini, le confermo che il problema non è dovuto ad impostazioni lato server.

Lo stesso è dato dall’errata codifica dell’immagine.

Va a richiamare immagini “criptate” in base64_decode. Se utilizzo un sito di decodifica, riporto il testo estrapolato in un file di prova l’immagine non viene caricata, come se fosse corrotta.

Esempio ho preso la pagina images/hg11-960.php

estrapolato il codice, codificato (Base64 Decode and Encode - Online), riportato su file jfif :

https://www.allegromolto.it/images/prova.jfif

questa è l’immagine corrotta.

I file jfif vengono regolarmente visualizzati lato server:

https://www.allegromolto.it/images/esempio.jfif

Non è possibile risalire al tipo di errore nella codifica.

le consiglio di richiamare le immagini “reali” pubblicandole.

Attendo suo riscontro in risposta alla presente per poi proporle chiusura.

Cordiali saluti"

Thanks. That’s unfortunately the attitude of who’s used to handcrafted code and websites. The password protection feature has undergone several revisions and bug fixes and we believe it to be 100% stable. We can be proven wrong of course, but it is more likely that the issue is somewhere in the hosting.

Please send the project file as previously requested and we’ll take a look.

Caro Duncan, scrivo in Italiano, purtroppo il mio inglese è zeppo di errori. Ho inviato una email contenente il progetto, se vi è arrivata una email wetransfer ignoratela poiché il file inviato era errato. Vi ho spiegato tutto nella email. Grazie per la vostra pazienza e comprensione. A presto