WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
Domaing mapping not mapped url for thumbnail getted from wp_get_attachment_image (7 posts)

  1. Vijay Kc
    Member
    Posted 1 year ago #

    WPMU Domain mapping plugin is not mapped url for thumbnails.

    I used wp_get_attachment_image function to get thumbnail.

    This is real url for sub domain
    http://site1.maindomain.org/wp-content/uploads/sites/2/2013/08/imagename.jpg

    After i installed Domain map it worked great for all of the images but not for thumbnail where i used wp_get_attachment_image function.

    The link above should have
    http://www.site1.org/wp-content/uploads/sites/2/2013/08/imagename.jpg

    Any Idea

    http://wordpress.org/plugins/wordpress-mu-domain-mapping/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    As a short term work around have you tried using wp_get_attachment_url ? (or one of the other media URL functions? You should be able to specify the thumbnail size with any of the media URL functions.

  3. Vijay Kc
    Member
    Posted 1 year ago #

    Thanks for reply Ron!
    I looked on http://codex.wordpress.org/Function_Reference/wp_get_attachment_url

    wp_get_atachment_url function don't have feature to define thumbnail size.

    So WPMU Domain Mapping Plugin can't replace the url for wp_get_attachment_image function? is it correct?

  4. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    So WPMU Domain Mapping Plugin can't replace the url for wp_get_attachment_image function? is it correct?

    Whether or not it can be filtered, we won't be fixing it immediately.

  5. Vijay Kc
    Member
    Posted 1 year ago #

    Thanks for reply again.

  6. JacoKoster
    Member
    Posted 1 year ago #

    I stumbled onto this exact problem and added the following lines to the domain-mapping.php file in the neighbourhood of line 667:

    add_filter('wp_get_attachment_url','domain_mapping_themes_uri');
    add_filter('upload_dir', 'domain_mapping_themes_uri');

    This fixes the problems i had with the images and fetches them of the correct domain :)

  7. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    Thanks :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.