ResponsiveImagesCG / wp-tevko-responsive-images

Fully responsive image plugin for wordpress
449 stars 53 forks source link

Full URL path to files #254

Closed pakpenyo closed 8 years ago

pakpenyo commented 8 years ago

I'm using other domain for store my image. This domain using cloudflare and support https.

Trying access mydomain with https, trial and error at the Full URL path to files (Media Settings).

When using http://storedomain.com/media, image cannot load properly when access ssl domain https://www.mydomain.com.

<img class="attachment-medium wp-post-image" width="720" height="405" sizes="(max-width: 720px) 100vw, 720px" srcset="storedomain.com/media/mozaik-151107-360x203.jpg 360w, storedomain.com/media/mozaik-151107-720x405.jpg 720w, storedomain.com/media/mozaik-151107.jpg 960w" alt="Mozaik" itemprop="image" title="mozaik-151107" src="storedomain.com/media/mozaik-151107-720x405.jpg">

Trying with //storedomain.com/media, i can see all images.

<img class="attachment-medium wp-post-image" width="720" height="405" sizes="(max-width: 720px) 100vw, 720px" srcset="//storedomain.com/media/mozaik-151107-360x203.jpg 360w, storedomain.com/media/mozaik-151107-720x405.jpg 720w, storedomain.com/media/mozaik-151107.jpg 960w" alt="Mozaik" itemprop="image" title="mozaik-151107" src="https://storedomain.com/media/mozaik-151107-720x405.jpg">

So, can i use //storedomain.com/media? I'm not sure :smile:

Thanks and really sorry about my bad english....

joemcgill commented 8 years ago

Hi @pakpenyo,

Using protocol relative URLs here should be fine. If you don't include the // at the beginning, the URLs will be read as relative paths, like this http://mysite.org/storedomain.com/media/image.jpg, which is why they weren't loading.