For your second question, you can add width
and height
options to the file settings so that it prevents the upload of bigger images, but you’ll still be able to upload smaller ones :
files:
width: 300
height: 300
Another way is to have a panel hook resize the images.
But why don’t you simply create 300 x 300 thumbnails, without restricting the file upload ?
As for the first question, I cannot say anything without seeing your code.