If you put some echo statements in there, is $this->fID returning what you expect? When you get the file by that ID does it return an object? Knowing where itâs failing would make it easier to help with fixing it.
itâs a way of instantiating new object with benefits so to say.
When you do it that way you get a whole lot of possibilities with instantiating classes and interacting with them you donât get when doing a simple new object()
If you want to know they can be either a boolean (but thatâs deprecated) or an array of options.
If using a boolean:
TRUE: asks for a picture tag to be used
FALSE: asks for an img tag to be used
Otherwise, the better way is to use an array with the following keys:
usePictureTag: true or false or null. TRUE (use a picture tag), FALSE (use an img tag), NULL or not specified use the settings from the current page theme
lazyLoadNative: If TRUE the loading="lazy" attribute will be added to the img
lazyLoadJavaScript: If TRUE set the img src and/or source srcset image file path to data-src and/or data-srcset