Skip to content
Snippets Groups Projects
Commit ecd8dd90 authored by James Calfee's avatar James Calfee
Browse files

Adjust image proxy large url size to use 1680x8400 (rotated and bound). #1098

parent 1ea556e8
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,7 @@ class Image extends React.Component {
const isFocused = state.selection.hasEdgeIn(node)
const className = isFocused ? 'active' : null
const prefix = $STM_Config.img_proxy_prefix ? ($STM_Config.img_proxy_prefix + '0x0/') : ''
const prefix = $STM_Config.img_proxy_prefix ? ($STM_Config.img_proxy_prefix + '1680x8400/') : ''
const alt = node.data.get('alt')
const src = node.data.get('src')
......
......@@ -162,14 +162,14 @@ function img(state, child) {
}
}
// For all img elements with non-local URLs, prepend the proxy URL (e.g. `https://img0.steemit.com/0x0/`)
// For all img elements with non-local URLs, prepend the proxy URL (e.g. `https://img0.steemit.com/1680x8400/`)
function proxifyImages(doc) {
if (!$STM_Config.img_proxy_prefix) return
if (!doc) return;
[...doc.getElementsByTagName('img')].forEach(node => {
const url = node.getAttribute('src')
if(! linksRe.local.test(url))
node.setAttribute('src', $STM_Config.img_proxy_prefix + '0x0/' + url)
node.setAttribute('src', $STM_Config.img_proxy_prefix + '1680x8400/' + url)
})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment