Skip to content

Wordpress image quality #25

@DaveG43

Description

@DaveG43

thanks for creating BFI_Thumb it works really well.

Using the following code as described in the readme in wordpress throws an error of "Undefined variable: quality, etc"
if ( has_post_thumbnail()) {
the_post_thumbnail( array( 560, 300, 'bfi_thumb' => true ) );
}
This error happens when the thumbnail is generated. It does not show again upon refreshing the page.
Setting the quality like this fixes the issue.
if ( has_post_thumbnail()) {
the_post_thumbnail( array( 560, 300, 'quality' => 80, 'bfi_thumb' => true ) );
}

Is it possible to set a default of '75' or something like that in case no quality parameter is set?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions