Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust images size according to the screen #499

Open
El-Gavy opened this issue Apr 6, 2017 · 27 comments
Open

Adjust images size according to the screen #499

El-Gavy opened this issue Apr 6, 2017 · 27 comments

Comments

@El-Gavy
Copy link

El-Gavy commented Apr 6, 2017

Images (and their captions) are not adjusted to the screen width (using Wallabag App 1.12.2 (32)) :

c8qzuolxuaaa6jm jpg large

@di72nn
Copy link
Member

di72nn commented Apr 6, 2017

Can you include the article URL as an example?

@El-Gavy
Copy link
Author

El-Gavy commented Apr 6, 2017

Sure. Here is the article URL of the screenshot above : https://framablog.org/2017/03/27/le-transit-cest-important-%f0%9f%99%82/

@di72nn
Copy link
Member

di72nn commented Apr 6, 2017

Do you use wallabag.it, framabag, or a self-hosted server? I ask because the responsive parameters of the images may be handled differently.

@El-Gavy
Copy link
Author

El-Gavy commented Apr 6, 2017

I use a self hosted server. Do you need the server version ?

@Strubbl
Copy link
Contributor

Strubbl commented Apr 6, 2017

yes

@El-Gavy
Copy link
Author

El-Gavy commented Apr 7, 2017

2.2.1

@di72nn
Copy link
Member

di72nn commented Apr 7, 2017

Do you have "image caching" enabled in the app? Can you try to toggle it and check the same article?

@El-Gavy
Copy link
Author

El-Gavy commented Apr 7, 2017

Image caching was enabled :

screenshot_2017-04-07-10-31-07

I toggled it, deleted the article in "Archives", closed the app, added the same article using my web browser (still on my smartphone).
Re-opening and checking the article, result is the same as previously.

Hoping that help.

@Strubbl
Copy link
Contributor

Strubbl commented Apr 7, 2017

There have been 138 commits to master since your version. To cite @di72nn: Maybe "you might want to try our beta version. You can opt-in for beta-testing on GPlay or download an APK."

@di72nn
Copy link
Member

di72nn commented Apr 7, 2017

Well, yeah. It is likely to be reproducible in the beta, but at least we will be sure it wasn't fixed recently.

I can't reproduce it on my device (Android 4.4, small screen): for some reason it is displayed ok regardless of app version and image caching.

I'm not into HTML, so I have a hard time understanding why this happens.

@Strubbl
Copy link
Contributor

Strubbl commented Apr 7, 2017

I couldn't reproduce it on my old Nexus 7 running the wallabag version installed from F-droid, so same version as @El-Gavy . On my mobile it is also not reproducible. :(

@El-Gavy
Copy link
Author

El-Gavy commented Apr 7, 2017

Trying to upgrade right now, coming back to you when done (hoping it goes well)

@El-Gavy
Copy link
Author

El-Gavy commented Apr 7, 2017

I don't know how i did this :

screenshot_2017-04-07-11-35-30

I selected one of the themes and it's ok now.

@Strubbl
Copy link
Contributor

Strubbl commented Apr 7, 2017

Cool that it is okay now.

So you had no theme pre-selected? That's crazy behaviour of the app. If i go to that menu, i have my theme preselected.

@El-Gavy
Copy link
Author

El-Gavy commented Apr 7, 2017

Well i'm sure i changed the theme at least once since installed. But maybe i was this way because of an update ?

@di72nn
Copy link
Member

di72nn commented Apr 7, 2017

The theme selection dialog acts weird because of this: d3e3b95 (the value stored in preferences doesn't match the enum name). I should have added a migration, but I've forgotten and it doesn't really matter. It can only reset theme to the default one and cause the dialog to show no selected option. It should work fine after any theme is selected.

Back to the original issue. Is it still there?

@El-Gavy
Copy link
Author

El-Gavy commented Apr 7, 2017

Ok, here we are :

  • On my android, i upgraded Wallabag App to Version 2.0.0a3 (102)
  • On my shared hosting, using FTP, i wiped my install, backing up only app/config/parameters.yml and /data. I uploaded version 2.2.2 and put back elements quoted before. Didn't know if it was necessary to clear var/cache folder.

The install looks ok, except i have this issue : wallabag/wallabag#3006 (always have it when i install wallabag, dunno why). The link server / app is working

Still have the issue, whereas it's ok with other articles...

Tried to delete article from app, disabled image cache then adding it again, still the issue.

However, i'm starting to strongly suspect a chair / keyboard interface problem...

@di72nn
Copy link
Member

di72nn commented Apr 7, 2017

Here are some things that should be noted:

  • The server can fetch article differently. That probably can be checked with web tools in a web browser. I'm not aware of any way to subtly break article fetching on the server side.
  • Depending on the app version the articles are downloaded differently: via RSS in the older version, via API in the beta. It seems to have no affect on the issue.
  • If image caching is enabled, the app strips responsive parameters from img tags. This is important, but seems to have no affect here so far.
  • The app uses Android WebView to display article content. The behavior may vary depending on Android version and possibly OEM customization.
  • Device characteristics (screen size, DPI, etc.) may have affect on responsive parameters handling.

Something in the last two points is likely to cause the problem.

Please state your Android version, device manufacturer, screen size and maybe something else that you think may be related.

This part of the app wasn't changed in a while and nobody mentioned such an issue, so either no one cares, or it is very rare.

@El-Gavy
Copy link
Author

El-Gavy commented Apr 7, 2017

Well i'm giving the infos, in case that could be useful later but i agree that it's rare, even on my device, it doesn't affect most of the articles. For instance, i checked other articles from the same website and images are fine.

Huawei KIW-L21 (Honor 5X)
EMUI 4.0
Android 6.0.1
1080*1920

@Strubbl
Copy link
Contributor

Strubbl commented Apr 7, 2017

Tried to delete article from app, disabled image cache then adding it again, still the issue.

On deleting an article in the app, the cached images are not removed from SD card AFAIK. But this should not affect the display issue here, i guess. Because in your screenshot it looks like the original image is cached successfully and is displayed in this original size.

@Strubbl
Copy link
Contributor

Strubbl commented Apr 7, 2017

do you have image caching enabled in your wallabag server?

@Strubbl
Copy link
Contributor

Strubbl commented Apr 7, 2017

is the image with the cat the only one which is wrongly sized displayed in the app? Or is the internet map image (the first one) also wrongly scaled?

@El-Gavy
Copy link
Author

El-Gavy commented Apr 7, 2017

All images of the article are wrongly sized.

Image caching is enabled on server (« 1 »)

@Strubbl
Copy link
Contributor

Strubbl commented Apr 7, 2017

Okay, thanks for the additional information. It would be really nice to see the debug messages of the app in that case.

@El-Gavy
Copy link
Author

El-Gavy commented Apr 7, 2017

Sure.

... ok, i have no idea where to find those debug messages xD

@di72nn
Copy link
Member

di72nn commented Apr 7, 2017

Image caching is enabled on server (« 1 »)

I totally forgot about it. That can break the content (responsive parameters are stripped?) too.

@ngosang
Copy link
Contributor

ngosang commented Apr 27, 2017

I'm having the image size problem in some images. I think the easy way to fix it is remove "width" & "height" attributes from "img" tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants