File tree 1 file changed +5
-6
lines changed 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -114,12 +114,6 @@ def get_tags(
114
114
ogp_use_first_image = config ["ogp_use_first_image" ]
115
115
ogp_image_alt = fields .get ("og:image:alt" , config ["ogp_image_alt" ])
116
116
117
- if image_url :
118
- image_url_parsed = urlparse (image_url )
119
- if not image_url_parsed .scheme :
120
- # Relative image path detected. Make absolute.
121
- image_url = urljoin (config ["ogp_site_url" ], image_url_parsed .path )
122
-
123
117
fields .pop ("og:image:alt" , None )
124
118
125
119
if ogp_use_first_image :
@@ -132,6 +126,11 @@ def get_tags(
132
126
ogp_image_alt = first_image .get ("alt" , None )
133
127
134
128
if image_url :
129
+ if image_url :
130
+ image_url_parsed = urlparse (image_url )
131
+ if not image_url_parsed .scheme :
132
+ # Relative image path detected. Make absolute.
133
+ image_url = urljoin (config ["ogp_site_url" ], image_url_parsed .path )
135
134
tags ["og:image" ] = image_url
136
135
137
136
# Add image alt text (either provided by config or from site_name)
You can’t perform that action at this time.
0 commit comments