close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Image Resizer doesn't seem to work with files that contain spaces

Thread began 11/14/2012 9:03 pm by Ian S | Last modified 12/13/2012 10:39 am by Jason Byrnes | 1523 views | 12 replies |

Ian S

Image Resizer doesn't seem to work with files that contain spaces

Hi Guys,

I've been scratching my head for a bit as I have a webpage where image resizer is applied to a repeat region.

Some of the images were resizing and cropping as instructed, but some were not.

After a bit of playing around I have discovered that the files that don't resize have spaces in the filenames (the images are user uploaded content so I can't control this).

Is this an issue you know about, or can replicate / fix?

Cheers
Ian

Sign in to reply to this post

Jason ByrnesWebAssist

I dont have a fix at this time, but i have logged the issue in our bug base to be corrected in a future update.


to prevent spaces in uploaded file names in the future, you can add the following at line 1 of pages that use the upload behavior:


php:
<?php
if(sizeof($_FILES) > 0) {
    foreach(
$_FILES as $k => $v) {
        
$_FILES[$k] = str_replace(" """$v);
    }
}
?>
Sign in to reply to this post

Ian S

Thank you Jason, that works for me!

Top support as always.

Cheers
Ian

Sign in to reply to this post

Ian S

Hi Jason,

I see that the latest version of the Image Resizer addresses the spacing issue in file names, and it does seem to be a big improvement but there are still some images that wont resize.

Please see:

shops.php?pageNum_rsshops=1&totalRows_rsshops=25

and look at the images for the shop - Madam Popoff Vintage

Some images with spaces do resize, others don't?

I'll try reuploading the problematic images tomorrow, but just wondered if I was missing something?

Cheers
Ian

Sign in to reply to this post

Jason ByrnesWebAssist

looking at the source:
<img src="http://www.seemysale.co.uk/public/seemylocalshop/madam popoff shop.jpg" alt="" width="225" border="0">


it looks like the image is hosted on another domain. Only images hosted on your site can be resized.

Sign in to reply to this post

Ian S

Hi Jason,

Thanks for getting back to me.

This was one of my very early considerations before I noticed the space issue.

However, all the images on that page are hosted on another domain.

e.g

<img src="../image_cache/site/www.seemysale.co.uk/public/seemylocalshop/crop/P5211465_w75_h60/P5211465_11091117.jpg" alt="" width="75" height="60" border="0"/>

But Image resizer appears to work for them?

Its just the odd few, with spaces, that don't seem to work.

Cheers
Ian

Sign in to reply to this post

Jason ByrnesWebAssist

you're right i was misspoken, it should work with remotely hosted images.

it seams that the update for spaces doesn't work with images on a remote server, i have reopened the bug so it can be corrected for remotely hosted images with spaces in the name.

Sign in to reply to this post

Ian S

Thanks Jason!

Sign in to reply to this post

Ian S

Hi Jason,

I posted this earlier but it seems to have disappeared.

Are there any plans to get the image resizer working with SEO friendly URLs? I know there is a jQuery fix on the forum, but would be good if the extension was able to handle them automatically.

Cheers
Ian

Sign in to reply to this post

Jason ByrnesWebAssist

the solution for this will be to add a base tag to the base with a full link using an href parameter.

for example, if you have a URL:
1

and that is a rewrite to:
news.php?post=1

then add a base tag of:
<base href="http://mysite.com/news.php">

just after the opening <head> tag of the page.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...