require \'uri\' uri = URI.parse \'http://dxczjjuegupb.cloudfront.net/wp-content/uploads/2017/10/Оуэн-Мэтьюс.jpg\'
The browsers have no problem with
The answer just came to me by asking myself the question:
begin uri = URI.parse(url) rescue URI::InvalidURIError uri = URI.parse(URI.escape(url)) end