diff --git a/_includes/refactor-content.html b/_includes/refactor-content.html
index 6db8923..dd09205 100644
--- a/_includes/refactor-content.html
+++ b/_includes/refactor-content.html
@@ -92,7 +92,11 @@
{% if site.img_cdn %}
- {% assign _src_prefix = site.img_cdn %}
+ {% if site.img_cdn contains '//' %}
+ {% assign _src_prefix = site.img_cdn %}
+ {% else %}
+ {% assign _src_prefix = site.img_cdn | relative_url %}
+ {% endif %}
{% else %}
{% assign _src_prefix = site.baseurl %}
{% endif %}