Skip to:

Adding a function for new image thumbnail sizes

  • JordashTalon


    I can see there is 3 functions for three different URL image sizes:

    function bp_album_picture_original_url()
    function bp_album_picture_middle_url()
    function bp_album_picture_thumb_url()

    If I wanted to make a new function to get the image in a different size (for example I want to get the image in a 300 pixel size in addition to the 600 pixel size that is already provided.

    Is that possible?

    Thanks for any help.

Viewing 3 replies - 1 through 3 (of 3 total)

  • JordashTalon


    Anyway to do this?




    For version 0.1.7, it would require over 4 hours of work. You would have to modify the media item DB table, image resizing functions, template tags, and admin panel functions. Basically, its not something you’d want to do. That’s why we decided to use a different strategy in 0.1.9.

    For version 0.1.9 …

    1) Create your new size in the cache configuration screen.
    2) Wherever you want to use the image, pass the size name as an arg to the cache function.

    For a detailed example, take a look at “Example #3” in the documentation wiki article on the featured content loop. This demonstrates both using a cache size and dynamic image resizing.





    @foxly Ok sweet, I guess i’ll just wait for the latest release, i’ll just make do with 0.1.7 cause I’m using it on a production site. Once the next release comes out it should add a ton of functionality.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding a function for new image thumbnail sizes’ is closed to new replies.
Skip to toolbar