Welcome, Guest
Username Password: Remember me

Image Resize based on $MobileJoomla_Device['screenwidth']
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Image Resize based on $MobileJoomla_Device['screenwidth']

Image Resize based on $MobileJoomla_Device['screenwi​dth'] 12 years, 10 months ago #6895

  • bastelix
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Dear all,

I'am new to Mobile Joomla and have a general question to the "image resize function". Even when I found lot of FAQs in this forum, I couldn't find a coherently answer to the mechanism for the screenwidth dedection.

Used environement
- Joomla 1.5.25
- Mobile Joomla RC5
- Opera Mobile Emulator 11.5
- physical mobile devices (Samsung, iPhone)

Problem
Depending of used mobile device, the dedected screenwidth is used to resize images larger than this width. So far OK, works well.

My problem now, when I use for e.g. Samsung Galaxy II with possible 480x800px resolution (WVGA portrait), the returned parameter is shown <meta name="MobileOptimized" content="240" />. I get the same value, when opening a desktop browser with /?device=xhtml (possible screenwidth 1600x900) or any other device with larger width of 240px ... it seams that this is the maximum. As a result of all images are then resized to only 240 width.

Did I miss somewhere a setting - or should this be true ?
Thank you for any hint in the right direction.

Re: Image Resize based on $MobileJoomla_Device['screenwi​dth'] 12 years, 10 months ago #6903

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
Modern devices differentiate "physical" pixels (480px in your case) and "logical" pixels that is used to measure distances on webpages. And logical-to-physical ratio could be 1.0 (most of old low dpi devices), 2.0 (high dpi devices, e.g. iPhone4), 1.5 or 1.333 (mid-dpi devices, e.g. Androids).

We get WURFL data for screen width. In the case of absence this data (e.g. disabled Mobile-TeraWURFL plugin or device is not in the database) the following default width are used:
for iphones - 320px
for others (xhtml) - 240px

I don't know what is related to your case.

Re: Image Resize based on $MobileJoomla_Device['screenwi​dth'] 12 years, 10 months ago #6912

  • bastelix
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Hi dryabov

Many thanks for your quick reply and the explanation! After checking the WURFL-DB to make sure that the mobile device is listed, I was able to identify the problem.

Firefox Browser on Android 2.3.3 sends incompletely user agent information; using official Android Webkit Browser the WURFL API works perfect. For all those with similar problems, the url www.mobilejoomla.com/ua.php helped to locate the issue.

May I ask at this point, is the WURFL-DB updated respectively when Mobile-Joomla launches a new RC? Or do you recommend to update the WURFL tables independently - as the mobile market is running to quick?

Thanks again for this great extension and your support.
Thomas

Re: Image Resize based on $MobileJoomla_Device['screenwi​dth'] 12 years, 10 months ago #6913

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
We use latest wurfl release (dated 17 Nov 2011). As soon as new update will be released we update MJ database.You can submit your User-Agent string for analysis (and including into wurfl db) here: www.tera-wurfl.com/ua_submission/

Re: Image Resize based on $MobileJoomla_Device['screenwi​dth'] 12 years, 8 months ago #7894

  • fidoboy
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Hello, i'm dealing with the MJ resize images method, cause it's not working well for iPad devices or with iPhone retina display. It's always using the same fixed width (320px i think) for all Apple devices, how can i get this working??

Thanks in advance

Re: Image Resize based on $MobileJoomla_Device['screenwi​dth'] 12 years, 8 months ago #8280

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
fidoboy, do you have active (published) Mobile-TeraWURFL plugin?
  • Page:
  • 1
Time to create page: 0.08 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.