Problem with "Preview in BBEdit"

98 views
Skip to first unread message

Fabrizio Ferrari

unread,
Oct 16, 2019, 7:54:32 PM10/16/19
to BBEdit Talk
Hello everyone.

I am trying to get out most of the useful "Preview in BBEdit" feature, but I am stuck in solving a problem.

The way I'd like to use that Preview feature is to display static HTML pages taken from my websites. All references to images like the following:

/images/icons/icon.jpg

Have no problems to be displayed once I put a simlink in the root disk of my Mac (I am on Mac OS), but if I have references looking at images on our content delivery network like this one:



I can't find a way to reference those locally. Any ideas? If you know how to do it, or you have a workaround, I'd really like to hear it!

Thanks in advance to anyone for any help.

All the best,

Fab.


Greg Raven

unread,
Oct 17, 2019, 8:00:44 AM10/17/19
to BBEdit Talk
I'm having difficulty understand what you are asking. Are you saying you want BBEdit to preview something other than the HTML code on your pages, or that you need a better way of managing your digital assets?

Sam Hathaway

unread,
Oct 17, 2019, 8:05:07 AM10/17/19
to BBEdit Talk

Once you have absolute paths and cross-domain assets you’re probably better off running a local web server and previewing in a real browser.

I haven’t done this on macOS but I know there are folks on this list who have and who could take you through it.

Hope this helps.
-sam

--
This is the BBEdit Talk public discussion group. If you have a
feature request or need technical support, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/619da703-9fb9-45e8-afe8-c835e61a4cd3%40googlegroups.com.

Fabrizio Ferrari

unread,
Oct 17, 2019, 10:27:15 AM10/17/19
to BBEdit Talk
I am sorry I wanst' clear.

I am talking about image references, with markup like this:

<img height="267" width="976" src="//cdn4.virtualsheetmusic.com/images/newdesign/gallery/imageSlideBIG/Halloween_Sheet_Music_4_BIG.png" alt="Halloween Sheet Music Collections" class="expimgbanners hideRESP558">


How can I have that image showing in the BBEdit Preview window? I have that image file locally inside a folder on my computer, so I guess there is a way to create a simlink somewhere to have the source:


I have no problems to load images like this for example:


<img height="267" width="976" src="/images/newdesign/gallery/imageSlideBIG/Halloween_Sheet_Music_4_BIG.png" alt="Halloween Sheet Music Collections" class="expimgbanners hideRESP558">

I just created a simlink to the /images/ directory on my computer root directory and made the trick. But any //cdn4.virtualsheetmusic.com reference brings to nowhere. Of course, I could just replace that with:

https://cdn4.virtualsheetmusic.com/images/newdesign/gallery/imageSlideBIG/Halloween_Sheet_Music_4_BIG.png

And let load the page from the web, but I am just wondering if there is a way to create a simlink somewhere on my local computer to have local images loaded instead.

I hope this is clear. Thank you!

Fab,

Eduard de kam

unread,
Oct 17, 2019, 11:40:26 AM10/17/19
to BBEdit Talk
I use the same folder/file structure locally as on the webserver.

So:
<div class= "kleinplaatje">
<img src="afbeeldingen/repro/repro-01.jpg" style= "width:210px;"></div>

works locally in de BBEdit preview

and it works on my site when published on the internet.
Or is that not the problem your are trying to solve?

Op donderdag 17 oktober 2019 01:54:32 UTC+2 schreef Fabrizio Ferrari:

Greg Raven

unread,
Oct 17, 2019, 5:06:39 PM10/17/19
to BBEdit Talk
Have you tried putting "http:" or "https:" in front of your external links? It's possible that BBEdit does not interpret external links in the format you are using.

Fabrizio Ferrari

unread,
Oct 18, 2019, 9:02:48 AM10/18/19
to BBEdit Talk
Oh yes, sure, if I add "https:" it works fine because it is going to grab the image over the network to the server, but I was wondering if there is a way to use the local images without altering the html code by creating a simlink somewhere on my system?

Thanks.

Fabrizio Ferrari

unread,
Oct 18, 2019, 9:02:51 AM10/18/19
to BBEdit Talk
Thanks Eduard,
yes, that works for relative paths like:

images/icons/image.jpg

And I can make work even paths like:

/images/icons/image.jpg

By creating a simlink at the root level for "images" linked to where the images actually are. What I am inquiring about are paths like:




Your ideas on that? Anyone?

Greg Raven

unread,
Oct 18, 2019, 9:20:49 AM10/18/19
to BBEdit Talk
This is not a BBEdit problem. If you run "Check Links" on pages with the //cdn links, you will note that BBEdit tells you those images cannot be found. Frankly, I can't for the life of me imagine why you would want to manage your assets this way. If the page points to the CDN version, then so should your preview. Otherwise, you could have an image on your local machine but not on the CDN, it would preview fine locally but the image would not appear in the published site. Wish you'd been more clear in the beginning; that's why I asked for clarification.

Fletcher Sandbeck

unread,
Oct 18, 2019, 10:36:27 AM10/18/19
to bbe...@googlegroups.com
Protocol relative URLs, starting with // but not specifying http or https, e.g. //www.example.com/asset.jpg, are useful on a site that is served through both HTTP and HTTPS to ensure that assets are loaded using the same protocol. I can't find a clear W3C standard for protocol relative URLs though they certainly have been part of standard practice for years.

Today, there is a clear recommendation that all sites be served using HTTPS exclusively. The expense and hit for using HTTPS is considerably less than it has been in the past. Your site will increasingly throw up warnings in most web browsers if it is still using, or even allowing, HTTP. 

So you might consider simply specifying the CDN links using HTTPS as the protocol. This will work fine if the page happens to be served over HTTP and doesn't incur any more overhead serving those resources than a normal HTTPS page load would. Possibly less since stray HTTP hits are less likely to be in the cache.

[fletcher]


-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.

bruce linde

unread,
Oct 18, 2019, 10:43:30 AM10/18/19
to bbe...@googlegroups.com
just confirming... you configured the site settings in your project, yes? i ask because i need to do that for each client site before those kinds of links work correctly.



bruce linde
5 happiness webmaster


--
This is the BBEdit Talk public discussion group. If you have a
feature request or need technical support, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.

Fabrizio Ferrari

unread,
Oct 20, 2019, 7:57:01 PM10/20/19
to BBEdit Talk
Thank you for the advice, yes, our site use https exclusively but yet, several links have // as references. We should actually update all those links and references to explicitly use https://
To unsubscribe from this group and stop receiving emails from it, send an email to bbe...@googlegroups.com.

Fabrizio Ferrari

unread,
Oct 20, 2019, 7:57:34 PM10/20/19
to BBEdit Talk
Good point.... the answer to your questions actually no! Would that change the issue in some way?
To unsubscribe from this group and stop receiving emails from it, send an email to bbe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages