We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3232
    • 380 Posts
    DirectResize seems to be on all images if placed within the RTE (it even popsup if the image is displaying at actual size) I can't seem to get it to work on images created outside of the rich text editor (via getting the source from an ImageTV and manually creating the image tag.)

    All of the settings are currently default. Once I get it working for these images I am going to limit it to only resize images via the class. But even if I change that setting now, it won't resize the particular images.

    Also, no matter which expander I use, only HighSide shows.

    Anyone experience anything like this?

    This is Modx v2.2.4 running on a LAMP server.

    --edit--

    Just noticed the following in the apache error log. seems strange since the image is displaying fine in the browser.

    [04-Jul-2012 09:13:59] PHP Warning:  getimagesize(/assets/images/recipes/season-1/104-cracker-dough.jpg) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in /home/admin/public_html/dev/ming-new/core/cache/includes/elements/modplugin/9.include.cache.php on line 75
    [ed. note: betoranaldi last edited this post 14 years, 3 months ago.]
      • 34049
      • 28 Posts
      Hi,

      Sorry to hear that you are having problems with the plugin. You cover a few issues here but hopefully we can sort them out. I used the plugin in Evo but it didn't seem to be updated for Revo, so I picked it up as something I wanted for Revo. I've got it working for the stuff I want it to do, however these other cases are new to me - basically what I'm trying to say is thanks for the feedback and I'll do what I can to help.

      To start with the issue about images created outside the RTE, could you please give a few more details so that I can try to replicate the problem? DirectResize doesn't really create any images, it does scan a rendered web page for the image tag, generates a small thumbnail in cache for display and then link to the original to be displayed in the chosen expander. So a specific example would help me.

      For selecting the expander again could you please provide a specific example on how you are setting the expander, I might then be able to work out why your selection is not getting picked up.

      Regards

      Adrian Cherry
        • 3232
        • 380 Posts
        Hey,

        I appreciate your work and totally understand that it may not work in all cases. Hopefully we can work together to get the plugin working better.

        As for the images created outside of the RTE. I have an image TV which allows a user to select an image from a media source. Lets say this TV is [[*photo]] and it has the default output, therefore it just outputs the source or image path.

        The code I have in my template is as follows:

        <img src="[[*photo]]" alt="[[*pagetitle]]" width="150" height="150" class="directResize" /> 


        After the page is rendered it becomes something like:

        <img src="/assets/images/path/to/image.jpg" alt="Current Items Title" width="150" height="150" class="directResize" /> 


        The way it was working in EVO (I'm upgrading from EVO to REVO) was that it was resizing the image (creating a thumbnail) which when clicked would open a larger version of the image with highside. The image tag seems to be ignored by the plugin in REVO.

        Looking at the server's log files, I do notice the following line:

        [04-Jul-2012 09:13:59] PHP Warning:  getimagesize(/assets/images/recipes/season-1/104-cracker-dough.jpg) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in /home/admin/public_html/dev/ming-new/core/cache/includes/elements/modplugin/9.include.cache.php on line 75


        It looks like it is errors out when trying to process the image, preventing highside/resizing of it.

        For the second part, when I activate the plugin with its default property set, all of the images in the assets/images folder are "directresized" in some cases, the images are being displayed at actual resolution so no resizing/cached images is required yet the plugin is creating a cached version and when clicked, the highside overlay appears with an identical image in it. Not really sure how I can explain this differently. If you would like, I can provide a frontend example of the issue.

        Let me know what I can do to help or if you need any other information from me. [ed. note: betoranaldi last edited this post 14 years, 3 months ago.]