Jump to content

Link image to external url and construction of pageTree


Michkael
 Share

Recommended Posts

Good day,

I want to do a page where I insert all kind of logos, icons images that I want to share externally.
Examples:
1) In my email signature there are included the socials icons
2) When I need to share my logo to partners, I want to be able to send them an url linking to that image.

At the moment I was doing an hidden page where are stocked all the images.
I want to be able to call these images for example in the header (logo) or in some other pages on my website.

Do you have any suggestion on the best strategy to do this?

Thank you.
Michael

Link to comment
Share on other sites

I'm not totally clear about what you're asking, but when it comes to accessing an image URL in a browser then this happens directly without PW getting involved. So if you use (or send someone) a URL to an image stored in a PW field...

http://yourwebsite.com/site/assets/files/1234/some-image.jpg

...or an image not uploaded to a PW field...

http://yourwebsite.com/site/templates/images/some-image.jpg

...or even outside the PW folder structure...

http://yourwebsite.com/some-folder/some-image.jpg

...then PHP and PW are not involved in serving that image. Well, strictly speaking the rules in the PW .htaccess can be involved but no need to worry about that at this point.

 

For images uploaded to a PW field you can get their URL via the API ($some_pageimage->url) or you can deduce the URL via the admin:

2019-01-04_105732.png.90107e68ea3053ce592645907919f238.png

But when it comes to things like logo images for use in an email signature I would tend not to store those in a PW field because you want them to be available at the URL for years to come and there's less chance of accidentally deleting the image or affecting its URL if you store it outside of a PW field.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...