[wp-trac] [WordPress Trac] #15311: dynamic image resize (on the fly) using already available functions

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 13 11:59:15 UTC 2012


#15311: dynamic image resize (on the fly) using already available functions
--------------------------+-----------------------------
 Reporter:  vteixeira     |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Media         |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+-----------------------------

Comment (by aharner):

 I had run into an issue where I used direct URLs to my images that I was
 generating from a custom database, and in those URLs I had converted
 spaces to '%20' for proper URLs to my images.

 because the file structure had them as spaces, I had to do a quick
 str_replace to fix the problem.

 figured I'd just make this note here incase anyone else ever runs into
 that issue:


 {{{
 //after this line:
 $actual_file_path = ltrim( $file_path['path'], '/' );
 $actual_file_path = rtrim( ABSPATH, '/' ).$file_path['path'];

 //ADDED THIS to replace '%20' from the URL with spaces:
 $actual_file_path = str_replace('%20', ' ', $actual_file_path);
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15311#comment:33>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list