External Images

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
lantaca
Posts: 10
Joined: Thu May 23, 2024 9:02 pm

External Images

Post by lantaca » Sat Dec 28, 2024 3:00 pm

Hello everyone
I have a problem displaying images from external links. The problem arose after updating to the 1.3.x platform, with version 1.2.x it works.
For example, if I use the following code string, the site says that the image does not exist

Code: Select all

[url=http://apod.nasa.gov/apod/astropix.html][img=http://apod.nasa.gov/apod/calendar/today.jpg][/url]
Attachments
Screenshot 2024-12-28 160058.png
Screenshot 2024-12-28 160058.png (57.01 KiB) Viewed 97123 times

User avatar
fraenkiman
Posts: 368
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: External Images

Post by fraenkiman » Sun Dec 29, 2024 9:47 pm

Hello lantaca,

try the BBcode HTML tag:

Code: Select all

[html]<a href="https://frank-web.dedyn.io/blog/fp-content/images/FlatPress/FlatPress.png" title="FlatPress-Projekt"><img src="https://frank-web.dedyn.io/blog/fp-content/images/FlatPress/.thumbs/FlatPress.png" alt="FlatPress.png" width="320" height="240" title="FlatPress-Projekt"></a>[/html]
or:

Code: Select all

[html]<a href="http://apod.nasa.gov/apod/astropix.html" title="n.a."><img src="http://apod.nasa.gov/apod/calendar/today.jpg" alt="n.a." title="n.a."></a>[/html]
Screenshot 2024-12-29 224713.png
Screenshot 2024-12-29 224713.png (180.9 KiB) Viewed 97111 times
Happy new year.
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

lantaca
Posts: 10
Joined: Thu May 23, 2024 9:02 pm

Re: External Images

Post by lantaca » Sun Jan 05, 2025 11:10 am

Thank you very much
now, i'm not be able to resize the image, why?

Code: Select all

[html]<a href="http://apod.nasa.gov/apod/astropix.html"><img src="http://apod.nasa.gov/apod/calendar/today.jpg" height=“80px” width=“80px” ></a>[/html]
this code doesn't work

User avatar
Arvid
FlatPress Coder
Posts: 625
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: External Images

Post by Arvid » Sun Jan 12, 2025 12:47 pm

Hi and thanks for reporting!

This is indeed a bug within the PhotoSwipe plugin - if deactivated, the standard BBCode plugin takes care of the img tag and displays the image properly.
I created an issue: https://github.com/flatpressblog/flatpress/issues/520

lantaca wrote: Sun Jan 05, 2025 11:10 am

Code: Select all

[html]<a href="http://apod.nasa.gov/apod/astropix.html"><img src="http://apod.nasa.gov/apod/calendar/today.jpg" height=“80px” width=“80px” ></a>[/html]
this code doesn't work
I assume you copied the code for the height and width attribute from a website that displays “typographic quotes” instead of "straight quotes". HTML does only work with straight quotes - simply replace them in your snippet:

Code: Select all

[html]<a href="http://apod.nasa.gov/apod/astropix.html"><img src="http://apod.nasa.gov/apod/calendar/today.jpg" height="80px" width="80px" ></a>[/html]
All the best,
Arvid

User avatar
Arvid
FlatPress Coder
Posts: 625
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: External Images

Post by Arvid » Sun Jan 12, 2025 2:40 pm

Luca,

I fixed the issue in the PhotoSwipe plugin; the fix will be part of FlatPress 1.4.
Can you please confirm that it works for you with the attached plugin version?

photoswipe.zip
(107.88 KiB) Downloaded 1435 times

All the best,
Arvid

User avatar
fraenkiman
Posts: 368
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: External Images

Post by fraenkiman » Sun Jan 12, 2025 5:07 pm

Hi Arvid,

this will not work with FlatPress 1.3.1. Inline scripts have no nonce value/are unsafe in 1.3.1. I'll do a little cleanup.

Give me some time.
With best regards
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

User avatar
fraenkiman
Posts: 368
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: External Images

Post by fraenkiman » Sun Jan 12, 2025 5:28 pm

Hello Luca,

with this version you can now test with FlatPress 1.3.1 whether external images are loaded.
photoswipe2_0_2.zip
(110.41 KiB) Downloaded 1360 times
With best regards
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

lantaca
Posts: 10
Joined: Thu May 23, 2024 9:02 pm

Re: External Images

Post by lantaca » Sun Jan 19, 2025 1:15 pm

thanks, I solved it by inserting the correct quotes, sorry but I didn't notice. I'll load the new plugin and give feedback

lantaca
Posts: 10
Joined: Thu May 23, 2024 9:02 pm

Re: External Images

Post by lantaca » Sun Jan 19, 2025 2:20 pm

Yess! the new version of plug in works propelly! now the external images are displayed with BBCode. Thank you so much!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests