Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating image size completely on the fly #15

Open
stuartha13 opened this issue Aug 8, 2015 · 2 comments
Open

Generating image size completely on the fly #15

stuartha13 opened this issue Aug 8, 2015 · 2 comments

Comments

@stuartha13
Copy link

Hi there

With BFI_Thumb I can generate a thumbnail (and creates a cached file in uploads/bfi_thumb/)only when I want to insert the image into the page, which is exactly what I want to do with my images:

$params = array( 'width' => 400 );
$image = bfi_thumb( "http://mysite.com/myimage.jpg", $params );
echo "<img src='$image'/>";
  1. Can I do the same thing with OTF Regen Thumbnails, instead of thumbs being generated on file upload/media size change?
  2. If I can do this, then how?
  3. Do the generated thumbnails also land up in their own folder in uploads/ (like BFI_Thumb does it)?

Thanks!

@Basilakis
Copy link

Yeap. I am also interested on that one! :)

@eoutvik
Copy link
Contributor

eoutvik commented Sep 14, 2015

  1. yes
  2. readme on https://github.com/gambitph/WP-OTF-Regenerate-Thumbnails Basically just use these WordPress functions every time you display images:
    wp_get_attachment_image_src();
    wp_get_attachment_image();
    the_post_thumbnail();
    get_the_post_thumbnail(); Like this: wp_get_attachment_image( $attachment_id, array(160, 90) );
  3. nope, but does that really matter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants