Image resizing is not working for me

Hi everyone,

First off, I absolutely love this CMS. Can’t wait to use it on a live project. However, I’m having some teething problems.

I’ve read through the documentation for image resizing, but I’m unable to get this working locally or on my digital ocean droplet.

From this page (https://docs.vapid.com/learn-more#images), I’ve tried the following:

{{example_1 type=photo width=800 alt="Example 1"}}

The type wasn’t recognised, so I assumed this way a typo in the documentation, in which case I updated it to:

{{example_1 type=image width=800 alt="Example 1"}}

While heading in the right direction, the image width wasn’t being honoured, instead it was using the native width instead. Either way, I decided to proceed, and update the tag to this:

{{photogallery1 label="Photo Gallery Image 1" type=image width=472}}

But still it continues to output the image at its native size. The generated HTML looks like this:

<img src="/uploads/1_b_561_e_031_bf_520_b_45_dd_99_b_2_c_6_b_4_fb_427_f_1085-c374616f90f0bea302c33d096a4ddf81.jpg">

I’ve uploaded a screen shot to show you the native size of 1254 x 1420 rather than it honouring the defined width of 472.

Has anyone else encountered this, or have any ideas on what I am doing wrong or how I can resolve it?

Thanks everyone.

Jon

@jonrcarey What version of Vapid are you using?

vapid -v

Hi @scott

Thanks for getting back to me.

I can confirm I am running Vapid 0.3.5. Is this the latest version or do I need to update?

Thanks,
Jon

Hi @scott

Not to worry, you pointed me in the right direction. The version of vapid I was using was out of date. I was following this tutorial: https://mallinson.ca/posts/12/vapid-on-digital-ocean

In that tutorial, the npm install was pointing to the old repository. I’ve managed to update it and everything is working beautifully.

Thanks,
Jon

1 Like