CMS Development

davidpru
Participant

PROBLEM file_manager / cdn HTML images

Hello good mornig for everyone.
I’m working with Local Lubl Server and I show an image with:

 

{% linked_image src='/file_manager/img/_assets/info/mockup-gastos-aeat.png', extra_classes='img-fluid w-100', wrapping_html='', overrideable=True, label='Name', open_in_new_tab=False %}

 

 

Then I upload this html with ftp. But the images are not displayed.

 

How to transform

/file_manager/img/_assets/info/mockup-gastos-aeat.png

to

https://cdn2.hubspot.net/hubfs/260057/_assets/info/mockup-gastos-aeat.png

?

 


Can you help me with this please?
Thanks!

0 Upvotes
1 Reply 1
lscanlan
HubSpot Alumni
HubSpot Alumni

PROBLEM file_manager / cdn HTML images

Hi David,

 

I think you got an answer to this on our dev Slack channel, but I just wanted to reply here as well in case other people come across the same question.

 

It sounds like while playing around with our Local HubL Server you found a module in one of the templates that looks something like this:

 

{% linked_image "wizard_module_132975146821281301859956560278824833351" src='/file_manager/img/banner-image.jpg', height='621', width='950', link='', wrapping_html='', overrideable=True, alt='banner-image.jpg', label='background Image', open_in_new_tab=False %}

 

And then if you preview the template, you'll see that it correctly loads the banner image. But that /file_manager/ path isn't really HubL; it's just set up in the Local HubL Server to mimic what it would be like linking to an asset hosted on the File Manager. You need to manually link to your File Manager asset either before or after uploading the template to HubSpot via FTP. So if for example your image lives at https://cdn2.hubspot.net/hubfs/260057/_assets/info/mockup-gastos-aeat.png, that's the actual URL that you need to set in your template.

 

Let me know if you have any questions about this.

 

Best,
Leland

Leland Scanlan

HubSpot Developer Support