It is important to remember that pineapples grow quite large - both upwards and their diameter can be well over 3 feet - and since they have rather sharp, spiky leaves that will nick a bare leg, so best thing is to not plant them too close to a pathway.