news-android icon indicating copy to clipboard operation
news-android copied to clipboard

enable use of image proxies

Open iNtEgraIR2021 opened this issue 1 year ago • 4 comments

Hi,

I love this great app. Also thumbs up 👍🏼 for you fast reaction to the security incident fixed in the last release.

As to my personal understanding this app downloads images straight from their (external) sources it would be a great improvement in terms of UX to me personal to be able to use an image proxy. (say images.weserv.nl or external.duckduckgo.com, or a self hosted server etc. ...).

That would increase privacy and might also decrease bandwidth usage. (say by using webp output instead of original png or jpg).

It should only take an additional user preference and a format string in DownloadImageHandler.java.

The user would enter e.g. https://weserv.images.nl?url=%s&output=webp.

Looking forward to your feedback.

Regards, Petra

iNtEgraIR2021 avatar Aug 27 '22 13:08 iNtEgraIR2021

@iNtEgraIR2021 Thank you for the proposal! Adding it in the DownloadImageHandler would only work images that are dowloaded by the app itself

  • Preview pictures in the list view
  • Favicons
  • Through the "Download images / Download articles offline" option in the menu

In the detail view images are downloaded by the WebView. In order to redirect them through an image proxy there are two options:

  1. Intercept all image requests and redirect them
  2. Rewrite all URLs in the HTML and use the image proxy there

I'm not sure which one would have less sideeffects.. both options require that the image urls have proper file extensions to match against) (I personally like the first option better). In general from a privacy standpoint I agree that it makes sense to support proxies. However quite a few publishers use advertisement etc as well which can be used for tracking so I'm not sure how big the benefit will be in the end.

David-Development avatar Sep 11 '22 10:09 David-Development

Hi @David-Development

thanks for looking into this 👍🏼

Option 1 sounds promising to me.

iNtEgraIR2021 avatar Sep 11 '22 13:09 iNtEgraIR2021

As a side note: I added images.weserv.nl as a proxy to convert SVG favicons to webp favicons since our image loading library doesn't support SVGs. -> https://github.com/nextcloud/news-android/pull/1115

David-Development avatar Sep 12 '22 15:09 David-Development

Thanks for working on this so quickly :+1: Looking forward to the integration of this PR.

iNtEgraIR2021 avatar Sep 14 '22 10:09 iNtEgraIR2021